What sound format and sampling to use?

Discussion in 'VOIP' started by Ramon F Herrera, Jul 7, 2005.

  1. Let's say that I would like to have the best possible sound quality in
    an Asterisk-based IVR system. What audio format (gsm, ulaw, etc.)
    should I use? What sampling rate and sample size?

    I always used 8000 Hz and 16 bit amplitude, but this was on non-VoIP
    Dialogic boards. I assumed that 8 KHz was the maximum that the POTS
    system could handle, but then I found in the Windows Sound Recorder a
    mode called "Telephone Quality" which uses 11.025 KHz and 8 bits only.

    Comments?

    -Ramon
    Ramon F Herrera, Jul 7, 2005
    #1
    1. Advertising

  2. In article <>,
    Ramon F Herrera <> wrote:
    >Let's say that I would like to have the best possible sound quality in
    >an Asterisk-based IVR system. What audio format (gsm, ulaw, etc.)
    >should I use? What sampling rate and sample size?
    >
    >I always used 8000 Hz and 16 bit amplitude, but this was on non-VoIP
    >Dialogic boards. I assumed that 8 KHz was the maximum that the POTS
    >system could handle, but then I found in the Windows Sound Recorder a
    >mode called "Telephone Quality" which uses 11.025 KHz and 8 bits only.


    real telco digital data uses 8000 8-bit samples/sec. (64kbit/sec.)

    There's some (but not a whole lot) excuse for going higher sampling and/or
    higher bit depth, so as to avoid 'off by one' errors, due to slight
    timing and/or quantization differences between your gear, and the telco's.

    For "best quality", use an uncompressed audio format. For voice, there
    is _very_little_ "noticable" loss, using a 'lossy' compression format
    at 32-kbit/sec.
    Robert Bonomi, Jul 7, 2005
    #2
    1. Advertising

  3. In article <>,
    Robert Bonomi <-bonomi.com> wrote:
    >In article <>,
    >Ramon F Herrera <> wrote:
    >>Let's say that I would like to have the best possible sound quality in
    >>an Asterisk-based IVR system. What audio format (gsm, ulaw, etc.)
    >>should I use? What sampling rate and sample size?
    >>
    >>I always used 8000 Hz and 16 bit amplitude, but this was on non-VoIP
    >>Dialogic boards. I assumed that 8 KHz was the maximum that the POTS
    >>system could handle, but then I found in the Windows Sound Recorder a
    >>mode called "Telephone Quality" which uses 11.025 KHz and 8 bits only.

    >
    >real telco digital data uses 8000 8-bit samples/sec. (64kbit/sec.)


    No. They sample at 8 KHz, but use a dynamic range compression called
    A-law (or uLaw, if in rightopondia. Very similar, but not exactly like.).
    The sampling needs to be at 13-14 bits, and it is advantagous to
    oversample by one bit. The result transmitted over the wire is a
    stream of 8-bit semilogarithmic values.

    GSM samples at the same frequency and at 13 bits, and applies a
    compression algorithm to the data, yielding a data stream of
    packets; nominally at 12 kilobits. It sounds "mobile phone".

    These encodings are reasonably good at handling small amounts of
    data loss.

    iLBC and G.729 (proprietary) use similar principles as GSM, but
    are not as bandwidth-constraimed, at various points in the 20-40
    kilobit range. iLBC uses a lot, G.729 a great deal of processing
    power in both ends, but sound pretty good.

    ADPCM and G.726 use adaptive PCM encodings, taking the idea of
    dynamic compression in A-Law even further. They are not as
    processing-intensive, but sound "blander" than G.729 and iLBC.

    G.723.1 is the last one I'll cover; a pure vocoder, representing
    coded phonemes instead of voice. Extremely good at getting sort
    of intelligable speech through at 5.3 kilobits; but sounds VERY
    much like D.Duck. Also proprietary.

    >There's some (but not a whole lot) excuse for going higher sampling and/or
    >higher bit depth, so as to avoid 'off by one' errors, due to slight
    >timing and/or quantization differences between your gear, and the telco's.
    >
    >For "best quality", use an uncompressed audio format. For voice, there
    >is _very_little_ "noticable" loss, using a 'lossy' compression format
    >at 32-kbit/sec.


    If you are using asterisk throughout, have a good network (but not
    unlimited bandwidth) and have fast servers for asterisk I would go
    for iLBC.

    If you have a rotten network use GSM and large jitter buffers.

    If you have unlimited bandwidth use G.711. (Alaw or uLaw depending
    on continent).

    Some phones and adapters may lead you to use G.726 or Speex.

    -- mrr
    Morten Reistad, Jul 21, 2005
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Marc
    Replies:
    22
    Views:
    1,011
    Senti
    Jan 22, 2004
  2. musicman
    Replies:
    0
    Views:
    639
    musicman
    Dec 29, 2006
  3. Scott W

    Down sampling and Nyquist limits

    Scott W, Nov 1, 2006, in forum: Digital Photography
    Replies:
    20
    Views:
    2,566
    Bart van der Wolf
    Nov 5, 2006
  4. Thierry MARTIN

    netflow v5 sampling / configuration

    Thierry MARTIN, Jul 13, 2007, in forum: Cisco
    Replies:
    2
    Views:
    1,364
    alexandreee
    Jul 29, 2007
  5. Robert Cooze

    mp3's down sampling and wave to mp3's and lame

    Robert Cooze, Jan 6, 2007, in forum: NZ Computing
    Replies:
    16
    Views:
    763
    Lawrence D'Oliveiro
    Jan 11, 2007
Loading...

Share This Page