Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -53,7 +53,9 @@ class QwenOmniHandler(AsyncStreamHandler):
|
|
53 |
self,
|
54 |
):
|
55 |
"""Connect to realtime API. Run forever in separate thread to keep connection open."""
|
56 |
-
|
|
|
|
|
57 |
async with connect(
|
58 |
API_URL,
|
59 |
additional_headers=headers,
|
@@ -156,6 +158,7 @@ async def handle_incoming_call(request: Request):
|
|
156 |
response = VoiceResponse()
|
157 |
response.say("Connecting to Qwen")
|
158 |
connect = Connect()
|
|
|
159 |
connect.stream(url=f"wss://{request.url.hostname}/telephone/handler")
|
160 |
response.append(connect)
|
161 |
response.say("The call has been disconnected.")
|
|
|
53 |
self,
|
54 |
):
|
55 |
"""Connect to realtime API. Run forever in separate thread to keep connection open."""
|
56 |
+
await self.wait_for_args()
|
57 |
+
voice_id = self.latest_args[1] or "Serena"
|
58 |
+
print("voice_id", voice_id)
|
59 |
async with connect(
|
60 |
API_URL,
|
61 |
additional_headers=headers,
|
|
|
158 |
response = VoiceResponse()
|
159 |
response.say("Connecting to Qwen")
|
160 |
connect = Connect()
|
161 |
+
print("request.url.hostname", request.url.hostname)
|
162 |
connect.stream(url=f"wss://{request.url.hostname}/telephone/handler")
|
163 |
response.append(connect)
|
164 |
response.say("The call has been disconnected.")
|