Header size/wav49 streaming error reading wav files

Integrating the Cepstral engine

Header size/wav49 streaming error reading wav files

Postby qmclaugh » Wed Feb 27, 2008 2:52 pm

Pardon me for posting this again - I posted as a reply in a year old section of the troubleshooting forum. Thought it would never see the light of day over there - thanks for understanding!

I would greatly appreciate some insights to this issue if anyone can help...

I have asterisk running on my mac and swift generating audio files:

Code: Select all
swift -o /tmp/$agi_uniqueid.wav -p audio/channels=1,audio/sampling-rate=8000,audio/encoding=pcm8


as soon as I ask asterisk to

Code: Select all
stream file /tmp/$agi_uniqueid #


back comes...

Code: Select all
[Feb 27 10:56:24] WARNING[187]: format_wav_gsm.c:142 check_header: Unexpected header size 16
[Feb 27 10:56:24] WARNING[187]: file.c:316 fn_wrapper: Unable to open format wav49


Help! Anyone ever get an answer on this?

Thank you...
qmclaugh
 
Posts: 2
Joined: Wed Feb 27, 2008 4:07 am

Postby Alex » Thu Mar 06, 2008 11:37 am

Greetings,

I have seen Asterisk users have more luck with scripting post-synthesis conversion to GSM format. Here is a link and the relevant snippet:


http://www.voip-info.org/tiki-index.php?page=Convert+WAV+audio+files+for+use+in+Asterisk

Converting your WAV files to good GSM files is easier than you might think if you have the program Sox installed. From the shell prompt, enter this command:

sox foo.wav -r 8000 foo.gsm resample -ql

and hit the <ENTER> key. Note that the sox option '-ql' (lower case L) modifies the resample option. It is not a number one (1). In a few moments you will have a new GSM format file in the same directory as the original WAV file. In this example "foo.wav" is your main voice menu audio file in WAV format, and "foo.gsm" is the same file converted to GSM format. If you wanted to, you could use "main-voice-menu.gsm" as the name in place of "foo.gsm": what matters here is the second file name you use in this command ends in ".gsm".



Something like:

Code: Select all
swift -o /tmp/$agi_uniqueid.wav -p "audio/channels=1,audio/sampling-rate=8000"   "Text here"
sox /tmp/$agi_uniqueid.wav /tmp/foo.gsm resample -ql


Could do the trick,

-Alex
Alex
 
Posts: 26
Joined: Mon Dec 04, 2006 11:19 am


Return to Asterisk

Who is online

Users browsing this forum: Google [Bot] and 10 guests

cron