faint-arm-51818
10/20/2025, 4:25 PMdeepgram.STT(model="nova-3", language="en-US") indicating base_url (even default), this error occurs:
aiohttp.client_exceptions.WSServerHandshakeError: 404, message='Invalid response status',tall-airline-16756
10/20/2025, 4:25 PMtall-airline-16756
10/20/2025, 4:26 PMtall-airline-16756
10/20/2025, 4:29 PMcurl -I https://gc-dh-deepgram-dev.drivehealth.ai/v1/listen
wscat -c "wss://gc-dh-deepgram-dev.drivehealth.ai/v1/listen?model=nova-3&sample_rate=16000&encoding=linear16" -H "Authorization: Token YOUR_API_KEY"
2. Check API Version Compatibility:
Sometimes deployments use different API versions. It’s worth trying both approaches to see which works best:
# STT v1 with HTTP base URL
stt_v1 = deepgram.STT(
base_url="https://gc-dh-deepgram-dev.drivehealth.ai/v1/listen",
api_key="your-api-key"
)
# STT v2 with WebSocket base URL
from livekit.plugins.deepgram import STTv2
stt_v2 = STTv2(
base_url="wss://gc-dh-deepgram-dev.drivehealth.ai/v2/listen",
api_key="your-api-key"
)
3. Test with Minimal Configuration:
To isolate the issue, try starting with a minimal setup like this:
stt = deepgram.STT(
base_url="https://gc-dh-deepgram-dev.drivehealth.ai/v1/listen",
api_key="your-api-key",
model="nova-3",
sample_rate=16000,
interim_results=True
)
4. Enable Debug Logging:
Adding logging can help us see exactly what WebSocket URL is being generated. Here’s how you can do that:
import logging
logging.basicConfig(level=logging.DEBUG)
stt = deepgram.STT(
base_url="https://gc-dh-deepgram-dev.drivehealth.ai/v1/listen",
api_key="your-api-key"
)
5. Verify Query Parameters Support:
Make sure your custom deployment supports query parameters like model, sample_rate, and encoding.
If you’re still running into issues, it would be really helpful if you could confirm a few things for me:
• Is this a self-hosted Deepgram deployment, an enterprise cloud deployment, or a custom proxy?
• Can you successfully connect to wss://gc-dh-deepgram-dev.drivehealth.ai/v1/listen using a WebSocket client?
• Are there any additional error messages in your logs besides the 404?
• Does your deployment use /v1/listen or perhaps a different path like /v2/listen?
I’m here to help, so please don’t hesitate to share any more details or questions you have! Sources: examples/voice_agents/error_callback.py