<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.6000.16809" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>The resampler will convert raw audio from one
sample rate to another. You are starting with Speex-encoded audio
frames. So, what you need to do is:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>1. Run the media frames through the Speex
decoder (look at Speexdec or testenc_uwb). This will give you raw audio
with a 32 KHz sample rate.</FONT></DIV>
<DIV><FONT face=Arial size=2>2. Use the resampler to convert the audio
from 32 KHz to 8 KHz sample rate.</FONT></DIV>
<DIV><FONT face=Arial size=2>3. Run the 8KHz audio through a G711
encoder.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>For the narrowband case, Asterisk is doing steps 1
and 3.</FONT></DIV>
<BLOCKQUOTE
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
<DIV
style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B>
<A title=malufrj@gmail.com href="mailto:malufrj@gmail.com">Thiago Maluf</A>
</DIV>
<DIV style="FONT: 10pt arial"><B>To:</B> <A title=speex-dev@xiph.org
href="mailto:speex-dev@xiph.org">speex-dev@xiph.org</A> </DIV>
<DIV style="FONT: 10pt arial"><B>Sent:</B> Tuesday, March 17, 2009 4:59
PM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> [Speex-dev] Resample
UltraWideBand to NarrowBand</DIV>
<DIV><BR></DIV>Hi List, <BR>Now I will send to you more specific what I am
trying to do.<BR>I have one Asterisk Channel where receives Midia Frames in
the codecs format: Speex UltraWideBand and Speex NarrowBand.<BR>When I use
Speex NarrowBand the Asterisk is able to convert this frame to G711.<BR>But
when I use Speex UltraWideBand the Asterisk don't convert it.<BR>Then I need
in my Asterisk Channel Source include the Speex Library in resample this frame
in 32KHz to 8KHz.<BR>Searching for it in Speex Doc, I found
it:<BR><BR>SpeexResamplerState *resampler;<BR>resampler =
speex_resampler_init(nb_channels, input_rate, output_rate, quality,
&err);<BR>err = speex_resampler_process_int(resampler, channelID, in, &in_length, out, &out_length);
<BR><BR>But in my source I have one *dataframe where is my payload. How I can
use it to resample my frame?<BR>Thanks you very much, Thiago.<BR>
<P>
<HR>
<P></P>_______________________________________________<BR>Speex-dev mailing
list<BR>Speex-dev@xiph.org<BR>http://lists.xiph.org/mailman/listinfo/speex-dev<BR></BLOCKQUOTE></BODY></HTML>