[Asterisk-Dev] [PATCH] Speex ultra wide band

Steve Underwood steveu at coppice.org
Thu Jun 9 08:50:53 MST 2005


Hi Alfred,

I think what you are doing is very valuable. Asterisk needs to be broken 
from this tie to 8000 sample/second operation. It is good to see someone 
working on it.

Regards,
Steve


Alfred E. Heggestad wrote:

>Hi
>
>attached is a preliminary patch enabling UWB (Ultra wide band 32kHz)
>part of the Speex codec. warning! it is not complete and the sampling
>rate is currently hardcoded to 32 kHz. the patch works fine with
>the app_mp3.c backend streaming mp3/http to speex/32000.
>
>before doing more work on this I have some questions:
>
>o Is anyone doing any similar work?
>  
>
I don't think so. I am implementing T.38, which also requires a number 
of changes to the RTP code, but I haven't heard of anyone implementing 
wideband.

>o What is the best way to negotiate sampling rate with SDP/SIP
>  in asterisk? I have added a rate parameter to the arrays
>  mimeTypes[] and static_RTP_PT[] in rtp.c but I am not sure
>  if that is a good solution. Are there any other non-8000 Hz
>  codecs I could look at ?
>  
>
There are a number of non-8000 sample/second codecs, but obviously none 
are supported by Asterisk. Wideband iLBC, G.722.1, wideband AMR and 
others offer 16000 sample/second audio. This is the popular rate for 
wideband. However, few offer the nested approach of Speex where an 8K 
stream can be extracted from an 16K or 32K one. I think what you have 
done is a good starting point. However, some additional cleverness would 
be needed to take advantage of the speex nesting feature.

>o Would it be better to add AST_FORMAT_SPEEX_WB = 1<<11 and
>  AST_FORMAT_SPEEX_UWB = 1<<12 ? my only worry is that Speex
>  can also support other sample rates.
>  
>
This approach uses up all the codec options rathr quickly. I don't think 
that is the right approach.

>o How to copy the "sample rate" info from chan_sip.c to codec_speex.c ?
>  the info must be re-entrant.
>  
>
The Asterisk codecs are rather inflexible about supporting options. I 
think that needs fixing, but I haven't looked at how.

Regards,
Steve




More information about the asterisk-dev mailing list