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="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">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>