mathusan
05/20/2025, 12:38 AMsilence-timed-out
error. Any guidance would be appreciated.Vapi Support Bot
05/20/2025, 12:39 AMsilence-timed-out
error. In Python, ensure you are sending audio chunks at regular intervals without long pauses. Here's a minimal outline:
python
import asyncio
import websockets
async def send_audio(uri, audio_chunks):
async with websockets.connect(uri) as ws:
for chunk in audio_chunks:
await ws.send(chunk) # chunk should be bytes in PCM s16le format
await asyncio.sleep(0.1) # adjust interval as needed for real-time streaming
# Make sure audio_chunks is a generator yielding small, regular PCM chunks
Keep the stream active by sending audio data continuously, and close the connection with a control message when done. For more, see the [WebSocket transport docs](https://docs.vapi.ai/calls/websocket-transport).
Source:
- [WebSocket Transport – Vapi Docs](https://docs.vapi.ai/calls/websocket-transport)Kings_big💫
05/20/2025, 12:13 PMmathusan
05/21/2025, 5:05 PMmathusan
05/21/2025, 5:09 PMspeech-update
message with a status of done
. But I also need to get the full transcript of what the agent just said. For that should I look for the voice-input
message, or transcript
message with status final
, or the conversation-update
message.
All of this I feel like I had to figure out on my own by just connecting to the WebSocket and see what messages were being sent and observing how they behaved.mathusan
05/21/2025, 5:10 PMKings_big💫
05/21/2025, 5:55 PMKings_big💫
05/21/2025, 5:55 PMmathusan
05/22/2025, 5:20 PMKings_big💫
05/22/2025, 5:46 PMKyle
05/23/2025, 4:13 AMmathusan
05/25/2025, 9:55 PMVapi Support Bot
05/25/2025, 9:57 PMjs
sendControlMessage({ type: "conversation-update" });
Any valid control message (such as conversation-update
or speech-update
) will keep the call active. Adjust the interval as needed to prevent timeouts, since the docs do not specify a required frequency.
Reference: [Vapi WebSocket Transport Docs](https://docs.vapi.ai/calls/websocket-transport)
Sources:
- [Vapi WebSocket Transport Docs](https://docs.vapi.ai/calls/websocket-transport)
- [Call Features](https://docs.vapi.ai/calls/call-features)gauti.jha37
05/29/2025, 1:15 PMKyle
05/30/2025, 11:39 AM