Often our customers will complain about their voice files sounding like static when they try to perform plays in Voice Elements. This is a common problem, and it has to do with trying to play the incorrect audio codec on a file.
μ-Law or MuLaw Format
When audio is transmitted “across the wire” it uses a Mu-Law 8khz 8bit format. Note that some European countries use an A-Law format which is supported as well.
The default codec on the Voice Resource is set to Codec.MULAW_8Khz_8Bit. The wav files that are commonly found on PCs are in a different format, and so when it tries to perform a play there is a mismatch and the audio doesn’t sound right.
Tips to Help Your Voice File Sound Clear
Changing the Codec
You can change the Codec by setting the Codec property on the Voice Resource like this:
VoiceResource.Codec = Codec.MULAW_8Khz_8Bit;
Once you use the correct audio format, your files should play clearly.
It’s important to keep in mind, that even though Voice Elements may be capable of playing higher quality audio, it still gets transmitted as 8Khz 8Kbit audio. For this reason, we generally recommend that you convert your audio to 8Khz 8Bit audio.
Converting Your Audio Files
We generally recommend converting your files to 8Khz 8Bit Mu-Law. There are several applications available that you can easily use to convert to this format. Shareware options include GoldWave, and WavePad. Many of our users have had good luck with the open source Audacity. When you need to convert your files in real time (i.e. during a call), our users have had good luck using the open source tool Sox.
If you have any questions, feel free to contact firstname.lastname@example.org.