[asterisk-users] Which sound file formats?

Tilghman Lesher tilghman at mail.jeffandtilghman.com
Mon May 12 19:54:03 CDT 2008


On Monday 12 May 2008 18:44, Roderick A. Anderson wrote:
> Tilghman Lesher wrote:
> > On Monday 12 May 2008 17:27, Roderick A. Anderson wrote:
> >> Al Baker wrote:
> >>> Asterisk will automatically chose the best format  - per ATFOT
> >>
> >> I guess I'm not getting my head wrapped around this concept.  I
> >> understand the choosing but not how I might influence it.  Probably best
> >> to just build them all and let Asterisk sort it out.  I'll research this
> >> some more.
> >
> > If you want to produce just one, I'd recommend producing slin or wav, as
> > they are essentially the same (slin is just wav without the header).  The
> > thing to note about this format is that as it is uncompressed, you will
> > reduce the amount of work needed for transcoding (other than if you have
> > native files), because transcoding from, for example, gsm to speex
> > requires two transcoding operations:  first, uncompress from gsm, and
> > second, compress to speex.  By adapting the most common intermediate
> > format, you only need one transcoding operation per packet.  Native files
> > require no transcoding at all. Transcoding tends to be the most CPU
> > intensive task on a typical Asterisk machine.
>
> Tilghman,
>
> Once again you come through clear.  But just to make sure I transcode
> this correctly I can remove all the other formats and only have .wav
> and/or .slin files.

Correct.  Just make sure that the wav files are 8000Hz, 16 bit signed linear
samples, single channel (mono) only.  Anything else will not give the desired
results.

> Simple and clean.  Plus swift can generate the .wav files optimized for
> VoIP.  I can go sox-less.  :-)

If you have the 8kHz voices, the default swift output will be exactly what
Asterisk requires.  The 16kHz voices will need to be down-sampled, however.

-- 
Tilghman



More information about the asterisk-users mailing list