patipato4u
07/29/2025, 5:22 PMAI Evy
07/29/2025, 5:22 PMAI Evy
07/29/2025, 5:22 PMcaptureDeviceId parameter :
javascript
await retellWebClient.startCall({
accessToken: createCallResponse.access_token,
sampleRate: 24000, // (Optional) set sample rate of the audio capture and playback
// (Optional) device id of the mic.
captureDeviceId: "default",
// (Optional) device id of the speaker
playbackDeviceId:
"0ec1807fd0fe6e51b990660ec4e2ebb78sdfcba51e279815d00c423ce03407ff",
// (Optional) Whether to emit "audio" events that contain raw pcm audio bytes represented by Float32Array
emitRawAudioSamples: false,
}) ;
You can also listen for error events to diagnose audio issues :
javascript
retellWebClient.on("error", (error) => {
console.error("An error occurred:", error) ;
// Stop the call
retellWebClient.stopCall() ;
}) ;
If the microphone permissions are granted but the agent still can't hear you, try setting the captureDeviceId to "default" explicitly or check the browser's developer console for any error messages that might indicate the specific audio capture issue .AI Evy
07/29/2025, 5:22 PMAI Evy
07/29/2025, 5:22 PM