Is there a way to get * to use wav files instead of gsm files for the voicemail, agents, and queues applications? Gsm does not give all the quality we would like to have, and we use no low bit rate codecs.
Asterisk allows wav automatically Damon Estep wrote:>Is there a way to get * to use wav files instead of gsm files for the >voicemail, agents, and queues applications? > >Gsm does not give all the quality we would like to have, and we use no >low bit rate codecs. >_______________________________________________ >--Bandwidth and Colocation sponsored by Easynews.com -- > >Asterisk-Users mailing list >Asterisk-Users@lists.digium.com >http://lists.digium.com/mailman/listinfo/asterisk-users >To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users > >-- ================================Joshua Abbott, Support Technician http://www.successfulhosting.com/ Direct Line: PENDING Phone: (866) 494-5096 x1207 E-Fax: (419) 858-3241 Alt E-Fax: (801) 217-1123 jabbott@SuccessfulHosting.com ================================The Success behind your web site! ================================ CONFIDENTIAL: This e-mail and any attachments are confidential and may be privileged. If you are not a named recipient, please notify the sender immediately and do not disclose the contents to another party, use it for any purpose, or store or copy the information in any medium.
Do you simply replace the .gsm files with .wav files and it plays them in these apps, or is there more to it? I am talking about the built in functionality of vm, queues, agents -- not the playback app.> -----Original Message----- > From: asterisk-users-bounces@lists.digium.com [mailto:asterisk-users- > bounces@lists.digium.com] On Behalf Of Joshua Abbott > Sent: Friday, September 16, 2005 7:15 PM > To: Asterisk Users Mailing List - Non-Commercial Discussion > Subject: Re: [Asterisk-Users] wav instead of gsm for vm-sounds? > > Asterisk allows wav automatically > > > Damon Estep wrote: > > >Is there a way to get * to use wav files instead of gsm files for the > >voicemail, agents, and queues applications? > > > >Gsm does not give all the quality we would like to have, and we useno> >low bit rate codecs. > >_______________________________________________ > >--Bandwidth and Colocation sponsored by Easynews.com -- > > > >Asterisk-Users mailing list > >Asterisk-Users@lists.digium.com > >http://lists.digium.com/mailman/listinfo/asterisk-users > >To UNSUBSCRIBE or update options visit: > > http://lists.digium.com/mailman/listinfo/asterisk-users > > > > > > > -- > ================================> Joshua Abbott, Support Technician > http://www.successfulhosting.com/ > Direct Line: PENDING > Phone: (866) 494-5096 x1207 > > E-Fax: (419) 858-3241 > Alt E-Fax: (801) 217-1123 > jabbott@SuccessfulHosting.com > ================================> The Success behind your web site! > ================================> > CONFIDENTIAL: This e-mail and any attachments are confidential andmay> be privileged. If you are not a named recipient, please notify the > sender immediately and do not disclose the contents to another party, > use it for any purpose, or store or copy the information in anymedium.> > _______________________________________________ > --Bandwidth and Colocation sponsored by Easynews.com -- > > Asterisk-Users mailing list > Asterisk-Users@lists.digium.com > http://lists.digium.com/mailman/listinfo/asterisk-users > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users
> Every attempt to play a file in Asterisk (that doesn't specify the > extension) will use the 'best' format it can find for the call'sformat.> The applications that ship with Asterisk do not specify any particular > format, so your best bet is to provide the files in all the formatsyou> expect your callers to be using, so Asterisk never has to transcode a > file playback. The same thing is true for voicemail recording; you > should record in every format your users might call in with, unlessthe> extra disk space consumption would be an issue.Thanks Kevin, Is there a reference of codec to preferred format somewhere? What is the best format match for g.711u?
Damon Estep wrote:> Is there a reference of codec to preferred format somewhere? What is the > best format match for g.711u?They are all pretty obvious: G.711 mu-law: ulaw (or ul) G.711 A-law: alaw (or al) GSM: gsm G.729: g729 Signed Linear (raw): sln (or raw) Just look at the source files in the formats directory to see which extensions map to which formats.
> > Damon Estep wrote: > > > Is there a reference of codec to preferred format somewhere? What isthe> > best format match for g.711u? > > They are all pretty obvious: > > G.711 mu-law: ulaw (or ul) > G.711 A-law: alaw (or al) > GSM: gsm > G.729: g729 > Signed Linear (raw): sln (or raw) > > Just look at the source files in the formats directory to see which > extensions map to which formats.Sorry for being so dense, but I am a little lost on this. I know that both TDM (zaptel) and g.711u are 8khz, 8bit, mono, raw PCM, so it makes sense that the sound file is best stored as a pcm file, 8khz, 8bit, mono. What I can not decipher is what file name extension should be used, should it be a .wav file encoded at 8k/8b/mono? Or are you telling me that it should be .ulaw Patience please... I know I should get this, bit I don't! Thanks a million. Damon
> Damon Estep wrote: > > > What I can not decipher is what file name extension should be used, > > should it be a .wav file encoded at 8k/8b/mono? Or are you tellingme> > that it should be .ulaw > > What I listed were file name extensions as recognized by Asterisk's > format modules and sox (and other tools). > > WAV at 8KHz 8-bit mono is _not_ the same thing as ulaw; WAV is not > compressed (normally), so that would be 8 bits of dynamic range. ulaw > and alaw are 8-bit compressed formats, with 13/14 bits of dynamicrange> (this is all documented on the wiki too, I think).Thanks Kevin!
> > Damon Estep wrote: > > > > > What I can not decipher is what file name extension should beused,> > > should it be a .wav file encoded at 8k/8b/mono? Or are you telling > me > > > that it should be .ulaw > > > > What I listed were file name extensions as recognized by Asterisk's > > format modules and sox (and other tools). > > > > WAV at 8KHz 8-bit mono is _not_ the same thing as ulaw; WAV is not > > compressed (normally), so that would be 8 bits of dynamic range.ulaw> > and alaw are 8-bit compressed formats, with 13/14 bits of dynamic > range > > (this is all documented on the wiki too, I think). >For others that may find this archived in the future! If using zaptel and g.711u you would want sound files saved in the ulaw format, so record at a higher quality, maybe 16bit, 8khz, mono WAV and the use sox to convert to ulaw Sox does not recognize .ulaw as a format so use .ul - both asterisk and sox recognize that extension # sox sound.wav sound.ul The quality, as Kevin mentioned, is far better than raw 8bit pcm. Having a set of files with the .ul extension present on the system will result in asterisk picking those files when the call is g.711u or zap.
> In article <432B744E.8040304@digium.com>, > Kevin P. Fleming <kpfleming@digium.com> wrote: > > Damon Estep wrote: > > > Do you simply replace the .gsm files with .wav files and it playsthem> > > in these apps, or is there more to it? > > > > > > I am talking about the built in functionality of vm, queues,agents --> > > not the playback app. > > > > Every attempt to play a file in Asterisk (that doesn't specify the > > extension) will use the 'best' format it can find for the call'sformat.> > The applications that ship with Asterisk do not specify anyparticular> > format, so your best bet is to provide the files in all the formatsyou> > expect your callers to be using, so Asterisk never has to transcodea> > file playback. The same thing is true for voicemail recording; you > > should record in every format your users might call in with, unlessthe> > extra disk space consumption would be an issue. > > Do wav or sln versions exist of the standard Asterisk sounds byAllison?> I mean the versions before GSM compression was applied, not just ones > obtained by uncompressing the GSM again. > > Cheers > Tony > -- > Tony Mountifield > Work: tony@softins.co.uk - http://www.softins.co.uk > Play: tony@mountifield.org - http://tony.mountifield.org > _______________________________________________Not sure about that Tony, we recorded a full set of sounds on our own so we would have a consistent voice in our customizations. We also change all of the references from 'extension' to 'phone number' It took a little time, but well worth it. We used a creative labs audigy sound card(good SNR) on a windows machine with a good mic and then processed the sounds in adobe audition, applying a high pass filter, low pass filter, silence removal, sound level normalization, and a 10% time reduction. The 10% time reduction and silence removal really helps things sound professional. We started with 16bit, 32khz, mono pcm wave files, we then did our processing, saving the file as 16bit, 8khz, mono after the processing and then finally converting to ulaw files using sox and a script found on the wiki with a few changes. 32khz gives good resolution for processing, and scales to 8khz well as it is a multiple of 8khz. 44khz is trickier to scale to 8khz and may result in some artifacting. 8khz is not a high enough sample rate to get good filter processing with some of the adobe filters. Here is the script I used in sox to do the final conversion; # for a in *.wav; do sox $a `echo $a|sed -e s/wav//`ul ; done Thanks to Kevin flemming for pointing me in the right direction on this.
> > Damon Estep wrote: > > > # for a in *.wav; do sox $a `echo $a|sed -e s/wav//`ul ; done > > I'll even give you another helpful hint (assuming you are using bash): > > # for a in *.wav; do sox $a ${a%.wav}.ul; done > > 'man bash' is interesting reading :-)Yeah, it shows, I am no linux expert... Is it safe to assume that having all of the prompts in a format that does not need to be transcoded will result in less cpu time with the same call load? Would it also make sense to do the same for MOH and move away from mp3? MOH with native files seems to be a little more limited than mp3. Can you have different classes of MOH files with native formats?
Kevin P. Fleming
2005-Sep-17 07:17 UTC
[Asterisk-Users] Re: wav instead of gsm for vm-sounds?
Damon Estep wrote:> Is it safe to assume that having all of the prompts in a format that > does not need to be transcoded will result in less cpu time with the > same call load?Absolutely.> Would it also make sense to do the same for MOH and move away from mp3? > MOH with native files seems to be a little more limited than mp3. Can > you have different classes of MOH files with native formats?Yes, you can have as many as you like. Using native format MOH will use more memory resources (more file handles and stream structures) but less CPU time, so you can decide on what makes sense for you. Also, calls that go on and off hold multiple times will resume the music at the same point, rather than just joining the existing stream.
> Damon, thanks for the tips on recording (below). I was particularly > interested in the 10% time reduction. I had a few questions about > it: > > a) are you doing a straight "speed-up", so that the frequencyincreases> by 11% as well as the speed? Or are you doing a pitch-preservingduration> adjustment? > > b) You mentioned using 32kHz sampling to avoid artefacts, but doesn't > the time reduction conflict with this? > > c) What is the nature of the perceived improvement? Does it make the > announcements just sound snappier? > > Cheers > Tony >The filter we use compresses the length without changing the pitch; I tried that with a few freeware programs, but did not get the results I wanted until using audition. The nice part about audition is if you can get what you need done in 30 days there is a trial! We ended up buying it since it worked well and we host a fair number of IVRs that are always changing. I really have no idea how the time compression works, but the sample rate before and after the compression is still 32khz, so the conversion to 8khz is cleaner (every 4th sample). I listened to a lot of IVRs over the years, including many recorded by the well known "worldly voices" commercial robbery service. The traits of a good recording are always the same, good dynamic range, but even average sound level (normalization), consistent space between words (silence removal with a consistent threshold), no mic pops (10th order high pass filter at 150hz), and no hiss (1st or 2nd order filter at 2khz), and finally, good pronunciation, which is easier to do talking slower, then fix it with software magic to make it sound like your voice model is a fast talker that never has to breath... I do not want to take anything away from the default sounds in asterisk; Alison has a good voice for it. Our primary goal was voice consistency with our entire system and a "makeover" to change "extensions" to "phone number" to better suit our application. Of course once you do the work, you have a lot of flexibility with format since you are down sampling, not up sampling. That is where I needed the help. I though I would expand on this thread a little since I did spend a fair amount of time on the wiki pages only to learn that there is little related information, and what is there is inaccurate or incomplete. Nowhere on the wiki will you find a recommendation like the one Kevin gave to use the native codec format for all sounds. In fact all references assume .wav or .gsm files. The reality is you want to have a format that matches each codec you use. Damon