monitor URL - live call playback settings
# support
s
Curious as to if there is any guidance on playing back the live call audio through the browser? I have tried to pin point the exact settings but have not done a great job. Either too slow or too fast and too high pitch or too low pitch, or extremely choppy. I can share config if this would help Using js to convert the audio for playback This is LIVE audio, not the stored recording file. Thank you
v
Hi there! 👋 I understand you're having trouble with live call audio playback in the browser, experiencing issues with speed, pitch, and choppiness. While I don't have specific configuration values that would solve your exact issues, I can definitely provide some guidance based on information I've found! ### Accessing Live Audio Stream You can access live call audio using the
listenUrl
which allows you to connect to a WebSocket and stream audio data in real-time. According to the [Vapi documentation](https://docs.vapi.ai/calls/call-features), you can obtain the
listenUrl
by triggering a
/call
endpoint, which returns it within the
monitor
object. ### Handling Audio Decoding Issues One common issue when streaming audio to browsers is encountering an "EncodingError: Unable to decode audio data." A solution that has worked for others is using an audioworklet processor. There's a GitHub repository that might help: [LIVE-LISTEN](https://github.com/esplanadeai/LIVE-LISTEN) which was recommended in a [Discord thread](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1335246255705690265) for someone with similar issues. ### Converting Audio from Buffer For live call audio, you'll need to formulate the audio from a buffer. The [Vapi documentation](https://docs.vapi.ai/calls/call-features#example-saving-audio-data-from-a-live-call) provides an example of getting live call audio in realtime using websockets which you can then convert into audio from a buffer. ### Audio Processing Configuration Certain configuration settings might affect the quality of your live call audio. Settings like
voicemailDetectionEnabled
,
backchannelingEnabled
, and
backgroundDenoisingEnabled
could influence playback quality according to a [Discord discussion](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1340031852819251384). ### Real-time Audio Streaming Considerations
For real-time audio, it's crucial to manage network latency, optimize buffers, and potentially use adaptive bitrate streaming. Incorrect buffer settings can lead to choppy or sped-up/slowed-down audio as mentioned in the [Eleven Labs provider documentation](https://docs.vapi.ai/providers/voice/elevenlabs). Would you like to share your current configuration so I can try to provide more specific guidance for your situation? Sources: - [Vapi documentation](https://docs.vapi.ai/calls/call-features) - [Discord thread](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1335246255705690265) - [Eleven Labs provider documentation](https://docs.vapi.ai/providers/voice/elevenlabs) - [Discord discussion](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1340031852819251384)
k
can you provide more examples of what you're trying to do and where you're stuck? This will help me understand your progress and the next step to unblock you.
s
@Shubham Bajaj I am retrieving the live call playback from active calls and connecting to the websocket via nextjs
I am trying to play that audio back when a user wants to listen in on their live calls
k
Hi, checking if this is resolved/solved for you?