<!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.16441" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>The Speex sample rate is 8000 Hz for narrowband
operation. </FONT><FONT face=Arial size=2>The Speex bitrate depends upon
the setting of the Quality parameter. Here is a table for narrowband from
the draft RTP definition:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>+------+---------------+-------------+<BR>| mode |
Speex quality | bitrate
|<BR>+------+---------------+-------------+<BR>| 1
| 0 |
2.15 kbit/s |<BR>|
|
|
|<BR>| 2 |
2 | 5.95 kbit/s
|<BR>|
|
|
|<BR>| 3 | 3 or 4 |
8.00 kbit/s |<BR>|
|
|
|<BR>| 4 | 5 or 6 |
11.0 kbit/s |<BR>|
|
|
|<BR>| 5 | 7 or 8 |
15.0 kbit/s |<BR>|
|
|
|<BR>| 6 |
9 | 18.2 kbit/s
|<BR>|
|
|
|<BR>| 7 |
10 | 24.6 kbit/s
|<BR>|
|
|
|<BR>| 8 |
1 | 3.95 kbit/s
|<BR>+------+---------------+-------------+<BR></FONT></DIV>
<DIV><FONT face=Arial size=2>So, you want the quality to be 3, and it is set
(default?) to 7 or 8. If you are talking about raw Speex frames, the
size should be 20 bytes, not 21.</DIV></FONT>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>This information is in Tables 8.1 and 8.2
the Speex manual (<A
href="http://www.speex.org/docs/">http://www.speex.org/docs/</A>). You
really should read it.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>- Jim</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2></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=yusuf.ihsanoglu@gmail.com
href="mailto:yusuf.ihsanoglu@gmail.com">Yusuf Bey</A> </DIV>
<DIV style="FONT: 10pt arial"><B>To:</B> <A
title=jean-marc.valin@usherbrooke.ca
href="mailto:jean-marc.valin@usherbrooke.ca">Jean-Marc Valin</A> ; <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> Wednesday, June 13, 2007 12:59
PM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> Re: [Speex-dev] 21bytes vs 38
bytes</DIV>
<DIV><BR></DIV>Hello, thank you for responding. I'm sure I'm confusing
something, but I did not explicitly set either kHz or kbps, I just set the
mode to narrowband, and traced through libspeex's code to see that sample_rate
was 8000 something, I'm guessing Hz. My assumption was: if you set PA to
nb-mode, then you should encode 160 bytes to 21. Is that mistaken?
<BR><BR><BR>ys<BR><BR><BR>
<DIV><SPAN class=gmail_quote>On 6/13/07, <B class=gmail_sendername>Jean-Marc
Valin</B> <<A
href="mailto:jean-marc.valin@usherbrooke.ca">jean-marc.valin@usherbrooke.ca</A>>
wrote:</SPAN>
<BLOCKQUOTE class=gmail_quote
style="PADDING-LEFT: 1ex; MARGIN: 0pt 0pt 0pt 0.8ex; BORDER-LEFT: rgb(204,204,204) 1px solid">You
you confusing kHz and kbps by any
chance?<BR><BR> Jean-Marc<BR><BR>Yusuf
Bey a écrit : <BR>> Hi, I am developing a voip phone that uses speex
v1.2b1 narrowband mode.<BR>> Libspeex decodes the 21-byte packets I
recieve into 160 bytes and I can<BR>> play<BR>> them fine, but when I
encode, the result is 38-bytes long. <BR>><BR>> I have read that 38
bytes means that it is encoding at 15KHz, but I have<BR>> set<BR>> it
to nb-mode and when stepping through the libspeex encoding sourcecode,
I<BR>> see that st->sampling_rate is 8000. <BR>><BR>> Any idea
why I speex-compress 160 bytes to 38 and not 21? Thanks in<BR>>
advance.<BR></BLOCKQUOTE></DIV><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>