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> &lt;<a href="mailto:jean-marc.valin@usherbrooke.ca">jean-marc.valin@usherbrooke.ca</a>&gt; 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>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Jean-Marc<br><br>Yusuf Bey a écrit :
<br>&gt; Hi, I am developing a voip phone that uses speex v1.2b1 narrowband mode.<br>&gt; Libspeex decodes the 21-byte packets I recieve into 160 bytes and I can<br>&gt; play<br>&gt; them fine, but when I encode, the result is 38-bytes long.
<br>&gt;<br>&gt; I have read that 38 bytes means that it is encoding at 15KHz, but I have<br>&gt; set<br>&gt; it to nb-mode and when stepping through the libspeex encoding sourcecode, I<br>&gt; see that st-&gt;sampling_rate is 8000.
<br>&gt;<br>&gt; Any idea why I speex-compress 160 bytes to 38 and not 21? Thanks in<br>&gt; advance.<br></blockquote></div><br>