"callautomation-azure-openai-voice" RuntimeWarning: coroutine 'CallMediaOperations.start_media_streaming' was never awaited self._call_media_client.start_media_streaming(
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- azure, python
- Lĩnh vực
- api, audio-video-rtc
Hướng nghiên cứu
Bắt đầu với các điểm vào incoming_call_handler và callbacks, đặc biệt là nhánh PlayCompleted và lệnh gọi start_media_streaming của nó, bằng cách sử dụng azure-communication-callautomation==1.4.0b1. Tái hiện RuntimeWarning với luồng cuộc gọi tối thiểu và xác minh rằng tính năng truyền phát media bắt đầu mà không có cảnh báo, đồng thời gửi âm thanh đến websocket đã cấu hình.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Please provide us with the following information:
This issue is for a: (mark with an x)
- [ ] bug report -> please search issues before submitting
- [ ] feature request
- [ ] documentation issue or request
- [x] regression (a behavior that used to work and stopped in a new release)
Minimal steps to reproduce
call_connection_client = acs_client.get_call_connection(call_connection_id)
await call_connection_client.start_media_streaming(
operation_callback_url=callback_uri,
operation_context="startMediaStreamingContext"
)
Any log messages given by the failure
Expected/desired behavior
I have played an audio source to the user once the call has been connected I started the media streaming so that I can send the audio to AI for assistance . but it is not happeing. this is my main code
<<<@app.route("/api/incomingCall", methods=['POST'])
async def incoming_call_handler():
app.logger.info("incoming event data")
for event_dict in await request.json:
global callback_uri,caller_id_latest
event = EventGridEvent.from_dict(event_dict)
app.logger.info("incoming event data --> %s", event.data)
if event.event_type == SystemEventNames.EventGridSubscriptionValidationEventName:
app.logger.info("Validating subscription")
validation_code = event.data['validationCode']
validation_response = {'validationResponse': validation_code}
return Response(response=json.dumps(validation_response), status=200)
elif event.event_type =="Microsoft.Communication.IncomingCall":
app.logger.info("Incoming call received: data=%s",
event.data)
if event.data['from']['kind'] =="phoneNumber":
caller_id = event.data['from']["phoneNumber"]["value"]
else :
caller_id = event.data['from']['rawId']
caller_id_latest = str(caller_id)
app.logger.info("incoming call handler caller id: %s",
caller_id)
incoming_call_context=event.data['incomingCallContext']
guid =uuid.uuid4()
query_parameters = urlencode({"callerId": caller_id})
callback_uri = f"{CALLBACK_EVENTS_URI}/{guid}?{query_parameters}"
parsed_url = urlparse(CALLBACK_EVENTS_URI)
websocket_url = urlunparse(('wss',parsed_url.netloc,'/ws','', '', ''))
app.logger.info("callback url: %s", callback_uri)
app.logger.info("websocket url: %s", websocket_url)
media_streaming_options = MediaStreamingOptions(
transport_url=websocket_url,
transport_type=MediaStreamingTransportType.WEBSOCKET,
content_type=MediaStreamingContentType.AUDIO,
audio_channel_type=MediaStreamingAudioChannelType.MIXED,
start_media_streaming=False,
enable_bidirectional=True,
audio_format=AudioFormat.PCM24_K_MONO)
answer_call_result = await acs_client.answer_call(incoming_call_context=incoming_call_context,
operation_context="incomingCall",
callback_url=callback_uri, media_streaming=media_streaming_options,cognitive_services_endpoint=cognitiveservices_endpoint_playmsg)
app.logger.info("Answered call for connection id: %s",
answer_call_result.call_connection_id)
return Response(status=200)
@app.route('/api/callbacks/', methods=['POST'])
async def callbacks(contextId):
for event in await request.json:
# Parsing callback events
global call_connection_id,transfer_call_agent,callback_uri
event_data = event['data']
call_connection_id = event_data["callConnectionId"]
app.logger.info(f"Received Event:-> {event['type']}, Correlation Id:-> {event_data['correlationId']}, CallConnectionId:-> {call_connection_id}")
if event['type'] == "Microsoft.Communication.CallConnected":
await handle_play(
call_connection_id=call_connection_id,
text_to_play="Hello how can i help you today?",
context="GetFreeFormText"
)
elif event['type'] == "Microsoft.Communication.PlayCompleted":
call_automation_client.get_call_connection(call_connection_id=event.data['callConnectionId'])
# # await call_connection_client.transfer_call_to_participant(target_participant=transfer_destination)
# # app.logger.info(f"Transfer call initiated: {context}")
call_connection_properties = await acs_client.get_call_connection(call_connection_id).get_call_properties()
call_connection_client = acs_client.get_call_connection(call_connection_id)
await call_connection_client.start_media_streaming(
operation_callback_url=callback_uri,
operation_context="startMediaStreamingContext"
) >>>
OS and Version?
Windows 7, 8 or 10. Linux (which distribution). macOS (Yosemite? El Capitan? Sierra?)
windows 10 using the devtunnels
Versions
I am using "azure-communication-callautomation==1.4.0b1" version
Mention any other details that might be useful
Thanks! We'll be in touch soon.
- Ngôn ngữ chính
- Python
- Star
- 45
- Fork
- 53
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của Azure-Samples/communication-services-python-quickstarts
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 30/100
Azure-Samples/communication-services-python-quickstarts#81 ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 35/100
Azure-Samples/communication-services-python-quickstarts#75 ·
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
Azure-Samples/communication-services-python-quickstarts#61 ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
Azure-Samples/communication-services-python-quickstarts#60 · 2 bình luận ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 35/100
Azure-Samples/communication-services-python-quickstarts#57 · 3 bình luận ·
Tất cả issue của Azure-Samples/communication-services-python-quickstarts
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
task
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
danparshall/claude_researcher#87 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
datajoint/datajoint-python#1586 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
1D intercept of length 1 is accepted as `fix_params` in population GLM with more than 1 unitCó thể đã có người làm @dhvani7014 đã nhận hôm nay. Đang mởbug good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
flatironinstitute/nemos#642 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Broken links in the docsĐang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 78/100
uniswap-python/uniswap-python#487 ·