scooter7 commited on
Commit
16d1141
·
verified ·
1 Parent(s): 27f1d38

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -2
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, we bypass the Twilio TURN credentials by setting rtc_configuration to None.
205
- rtc_config = get_twilio_turn_credentials() if not get_space() else None
 
 
 
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(