I have uploaded a load of custom .wav files into /var/lib/asterisk/sounds/ and have converted them using:
for i in *.wav; do sox $i -c 1 $(basename $i .wav).gsm; done
but when I now use the, say voicemail for example, you get
"you have" click “one” click “new message” click “press one for…” click. It is like the sound files don’t end it silence, or are clipped? I have downloaded the .gsm files and they all start and end with silence and when I play them using quicktime they play fine without clicks.
The original file format is .WAV however you have it so the file is renamed in the format of .WAV.GSM so it reads it as a GSM file but yet its true form is .WAV right?
If i am right this will cause the clicking, Asterisk will sample it at GSM rates but yet .WAV has different sampling rates to that of GSM.
Your best bet is to get some software of the internet that allows you to Batch process them into .GSM format so they are presented to Asterisk as a true format .GSM file, this way you can avoid the whole scenario of trying to trick Asterisk as sometimes that just doesn’t work.
However though if that is not the case maybe you can elaborate a little further for me so that way myself or maybe others can help you out a little.
I uploaded the WAV’s as 8khz mono and then converted them into true .gsm files using the sox command. The .wav and so the .gsm files too after conversion all start and end with silence and are normalised. If I download the GSM files and play them in quicktime they play fine and don’t appear to click. I think it is something to do with the way that asterisk plays the .gsm files that is causing the clicking.
I am glad I am not the only one with this problem, it is really causing me grief!
I am not sure what other info I can give you guys… but I have to solve this so all help will be appriciated!
Is there any reason as to why you want to use GSM file format and not WAV or even uLAW file format?
I stopped using GSM a long time ago, too many problems with using them and most of them no resolution could be found.
Why don’t you try using WAV files or uLAW files, the files sizes are not much different to each other, and if your using them as Voicemail files to send out to e-mails then WAV files are supported by any mainstream media player.
Just a thought, i know it dont resolve the GSM problem, but sometimes problems that require immense amounts of time trying to solve them are best of leaving alone and finding another alternative at least until you can resolve it another way.
Thanks for this - converting to the appropriate .wav format has got rid of the clicking noises. It seems the load is slightly higher on the server using .wav’s but not noticible enough to put it back to clicking!