node-rtp
node-rtp copied to clipboard
Help with Audio Conversions
Hello @mscdex,
I'm trying to follow your example (sendg711.js
) on streaming RTP-based audio to a Cisco phone. I used https://g711.org/ to convert one of my .wav
using the "Standard Definition 16-bit WAV (8Khz, Mono, 16-Bit PCM)" option. This produced the clearest audio on the phone, whereas the rest of the conversions were intercombined with static or completely unintelligible.
However, I'm having some issues with receiving the audio on my phone. Using the default code:
intvl = setInterval(writeData, 20);
yields the audio streaming for about 2 seconds, no audio for 2 seconds, and the audio continuing intermittently so on. If I decrease the param of 20
to 8
(for example), there are no more gaps of silence but the audio appears to 'overlap' during the streaming process. Increasing past 20 also respectively increases the gaps.
Do you have any tips on what the problem might be or how I should better convert my audio file?