Update app.py
Browse files
app.py
CHANGED
@@ -201,8 +201,11 @@ class RAGVoiceHandler(AsyncStreamHandler):
|
|
201 |
# 4. Voice Streaming Setup & FastAPI Endpoints
|
202 |
# ====================================================
|
203 |
|
204 |
-
# When running on Hugging Face Spaces,
|
205 |
-
|
|
|
|
|
|
|
206 |
|
207 |
# Create a Stream instance using our RAGVoiceHandler.
|
208 |
stream = Stream(
|
|
|
201 |
# 4. Voice Streaming Setup & FastAPI Endpoints
|
202 |
# ====================================================
|
203 |
|
204 |
+
# When running on Hugging Face Spaces, supply a dummy RTC configuration.
|
205 |
+
if get_space():
|
206 |
+
rtc_config = {"iceServers": [{"urls": "stun:stun.l.google.com:19302"}]}
|
207 |
+
else:
|
208 |
+
rtc_config = get_twilio_turn_credentials()
|
209 |
|
210 |
# Create a Stream instance using our RAGVoiceHandler.
|
211 |
stream = Stream(
|