16-bit PCM audio is just &quot;raw&quot; audio, sometimes you&#39;ll see &quot;SLIN&quot; or &quot;signed linear&quot; or some other designations. Whenever you see that just know that FS is dealing with raw, unencoded audio. Therefore it is neither alaw nor ulaw. You *can* record to a file with specific encoding, but that&#39;s usually not needed. 99% of the time just a simple wav file with PCM audio is perfectly sufficient.<br>
<br>-MC<br><br><div class="gmail_quote">On Thu, May 31, 2012 at 11:00 AM, Hector Geraldino <span dir="ltr">&lt;<a href="mailto:Hector.Geraldino@ipsoft.com" target="_blank">Hector.Geraldino@ipsoft.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Thanks Peter, it&#39;s much more clear now.<br>
<br>
By default, when recording a session to a wav file, I can see in the audio file properties that: the sample rate is 8000 Hz (8kz as mentioned), and the codec says &quot;Uncompressed 16-bit PCM audio&quot;. By default, is it ulaw or alaw?<br>

<br>
Sorry for the confusion, I&#39;m trying to catch up with all this information about codec negotiation, codecs and audio formats but it&#39;s a little bit overwhelming for a novice like me.<br>
<br>
Thanks again<br>
<br>
-----Original Message-----<br>
From: <a href="mailto:freeswitch-users-bounces@lists.freeswitch.org">freeswitch-users-bounces@lists.freeswitch.org</a> [mailto:<a href="mailto:freeswitch-users-bounces@lists.freeswitch.org">freeswitch-users-bounces@lists.freeswitch.org</a>] On Behalf Of Peter Olsson<br>

Sent: Thursday, May 31, 2012 2:10 AM<br>
To: FreeSWITCH Users Help<br>
Subject: Re: [Freeswitch-users] uuid_record and recording output format<br>
<br>
The sample rate is the rate, so 8000 is the same as 8khz, it&#39;s got nothing to do with 8 or 16 bit.<br>
<br>
FreeSWITCH always converts to L16 (linear 16-bit), so that&#39;s why you get this result. You can force to record to a raw file, for instance, try recording to testfile.PCMA to record in G7.11 alaw format.<br>
<br>
/Peter<br>
<br>
30 maj 2012 kl. 16:37 skrev &quot;Hector Geraldino&quot; &lt;<a href="mailto:Hector.Geraldino@ipsoft.com">Hector.Geraldino@ipsoft.com</a>&lt;mailto:<a href="mailto:Hector.Geraldino@ipsoft.com">Hector.Geraldino@ipsoft.com</a>&gt;&gt;:<br>

<br>
Greetings,<br>
<br>
I&#39;m using a 3rd party application (ndev dragonmobile) to get the transcription of some audio recorded by FreeSWITCH. Think about it as a voicemail transcription service. The problem I&#39;m facing is that, when I record a session using uuid_record, the output file is encoded in PCM  16-bit @ 8khz. Correct me if I&#39;m wrong, but my understanding is that if I want to capture audio from calls coming from the PSTN (analog/landlines), the best I can do is to record it in 8-bits (using G.711).<br>

<br>
I don&#39;t want to use sox (or any other tool) to resample the output file, and what I&#39;ve tried so far is setting the sample_rate variable on the diaplan as recommended on the wiki: <a href="http://wiki.freeswitch.org/wiki/Variable_record_rate" target="_blank">http://wiki.freeswitch.org/wiki/Variable_record_rate</a><br>

<br>
                &lt;action application=&quot;set&quot; data=&quot;record_sample_rate=8000&quot;/&gt;<br>
<br>
This doesn&#39;t have any effect on the generated wav file, which is still encoded in 16-bits. So my question is: does this variable affects the behavior of the uuid_record command? Or, do I really need to encode the audio output in 8-bits when the origin of the call comes from the PSTN? How is FreeSWITCH encoding the audio in 16-bits if, in theory, the best rate we can get from an analog line is 8-bits?<br>

<br>
Sorry if I&#39;m misunderstanding something, but I&#39;m not a telephony/voip guy, more like a java developer.<br>
<br>
Thanks for your help.<br>
<br>
<br>
!DSPAM:4fc62d7332761385138176!<br></blockquote></div><br>