status code=-1 for sarvam stt streaming error. Wha...
# ask-ai
n
status code=-1 for sarvam stt streaming error. What might be the causes?
t
Thanks for reaching out, Dhruv. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
You're seeing "status code = -1" for Sarvam STT streaming — I can help troubleshoot. To narrow down causes, could you provide the following details? • Are you using LiveKit's server-side integration or a client-side WebSocket/RTC stream to Sarvam? • Exact error timing: happens immediately on connect, during audio transmission, or randomly? • Audio format/codec (PCM 16k/48k, sample rate, channels) and whether you're sending raw audio or encoded frames. • Network conditions: any packet loss, proxy, VPN, or firewall between client and Sarvam? • Any reconnection attempts or retries observed in logs? • Full relevant logs (connection handshake, headers, and the STT stream error lines) and exact timestamp. • Sarvam account/endpoint settings (auth token type, timeout, simultaneous streams) if available. Common causes to check while you gather details: • Network/connectivity issues (firewall/proxy blocking or unstable connection). • Authentication problems or expired/invalid tokens. • Mismatched audio format or unsupported codec causing stream rejection. • Keepalive/timeout settings causing the remote service to drop the connection. • Client-side serialization/frame format not matching Sarvam's expected payload. • quota or rate-limiting on the Sarvam side causing abrupt disconnects. Share the requested details and a short excerpt of the logs and I’ll suggest precise next steps and diagnostic checks.
n
Sarvam streaming error: Unknown error Error handling message: Sarvam streaming error: Unknown error (status_code=-1, request_id=None, body=None, retryable=True)
t
Thanks — you're seeing an unknown Sarvam streaming error with
status_code=-1
,
request_id=None
,
body=None
, and
retryable=True
. I’ll help narrow this down. What this typically means • The client failed before a valid HTTP response was received from Sarvam — most often a network- or client-side failure (connection timeout, DNS failure, connection reset, or interruption during the request). •
retryable=True
indicates the LiveKit agent marked it transient and may retry. • Missing
request_id
and
body
means Sarvam didn’t return a populated error response. Please provide these items so I can diagnose precisely • Agent/server logs around the failure (include timestamps and any stack traces). • Whether the Sarvam integration uses the Python plugin and that
SARVAM_API_KEY
is set. • When the error occurs: on initial connect, after streaming starts, or intermittently. • Network context: server location, proxy, VPN, firewall rules, or intermittent packet loss. • Audio format being sent (sample rate, channels, PCM/encoded). • Any retry behavior seen (how many retries, backoff). Immediate checks you can run • Verify
SARVAM_API_KEY
is present and not expired. • Test basic connectivity from the agent host to Sarvam endpoints (DNS resolve + TCP connect) and note latency/timeouts. • Check for firewall/proxy/NAT issues or VPNs that could reset long-lived connections. • Confirm the client is sending the expected audio format/frame envelope required by the Sarvam plugin. • Increase client-side timeouts and capture a single failed request with full request/response (if any) and network trace (tcpdump) for the exact moment. If you share the logs and answers above, I’ll pinpoint likely root causes and next steps (specific config changes, retry tuning, or fallback options). Would you like help collecting the exact log snippets and commands to run for connectivity checks? Sources: Events and error handling | LiveKit docs | Sarvam STT plugin guide | LiveKit Docs