Hi mzeydkurt,
To address your issue with the WebSocket local usage, there are a few areas you could check to ensure proper function:
1. **WebSocket Connection**: Ensure you have successfully established a WebSocket connection using the correct URL and that the connection is open before sending audio data.
2. **Microphone Access**: Verify that your application has permission to access the microphone. You can check this in your browser settings or on your device.
3. **Audio Data Stream**: Confirm that you are correctly capturing and encoding the audio data into the PCM format as per the [WebSocket Transport documentation](
https://docs.vapi.ai/calls/websocket-transport). The audio should be streamed in
pcm_s16le
format with a sample rate of 16kHz.
4. **Echo Issues**: If there is an echo, consider using headphones or verifying that your audio context's source and processor are correctly configured to avoid feedback loops.
Review these steps to troubleshoot the connection and audio streaming. If the issue persists, it might be helpful to check the code for handling WebSocket events such as
onaudioprocess
or errors.