xlab
2005-May-03 17:53 UTC
[Asterisk-Users] Audio quality problem recording calls using gsm codec
When using phones that are using G.711 codec and the calls are recorded with "Monitor", when played back the files sound great. When we use gsm codec at one or both ends of the call, the recorded files sound very bad. Much worse than the audio sounds during the call. With the "Monitor" command we have tried WAV, wav, and gsm and this does not make any noticable difference, the sound quality is still poor (actually about the same each way). We have tried the following and get the same results: Two different computers - P4 w/Intel mb, 3.0 GHz, 1GB ram Dell 2850 dual processor 3GHz, 3GB ram Used latest Asterisk stable version, and latest CVS head. (Fedora Core 3) Any help would be appreciated. The goal is to have everything use gsm to cut down the bandwidth some. Note: We are also using MeetMe, and using the "m" option to record the conference. When this is done the quality of the audio is good even when the phones are using gsm codecs.
Tony Mountifield
2005-May-04 01:18 UTC
[Asterisk-Users] Re: Audio quality problem recording calls using gsm codec
In article <42781D12.2050105@tidalwave.net>, xlab <xlab@tidalwave.net> wrote:> When using phones that are using G.711 codec and the calls are recorded > with "Monitor", when played back the files sound great. > > When we use gsm codec at one or both ends of the call, the recorded > files sound very bad. Much worse than the audio sounds during the call. > > With the "Monitor" command we have tried WAV, wav, and gsm and this does > not make any noticable difference, the sound quality is still poor > (actually about the same each way).This is probably because Asterisk calls sox to mix the separate incoming and outgoing files into a single file. In order to mix two gsm files, sox will need internally to convert them both to linear, do the mixing, and then convert back to gsm. Since gsm is not a lossless compression, the sound gets worse with each conversion round-trip. I'm not sure what you can do about it. Try wav again, which is supposed to be linear. WAV and gsm are both GSM compressed. Or possibly you could try signed linear explicity as a format (can't remember whether it is sln or slin). Cheers Tony -- Tony Mountifield Work: tony@softins.co.uk - http://www.softins.co.uk Play: tony@mountifield.org - http://tony.mountifield.org
xlab
2005-May-04 12:56 UTC
[Asterisk-Users] Re: Audio quality problem recording calls using gsm codec
> In article <42781D12.2050105@tidalwave.net>, xlab <xlab@tidalwave.net> > wrote: > >>When using phones that are using G.711 codec and the calls are recorded >>with "Monitor", when played back the files sound great. >> >>When we use gsm codec at one or both ends of the call, the recorded >>files sound very bad. Much worse than the audio sounds during the call. >> >>With the "Monitor" command we have tried WAV, wav, and gsm and this does >>not make any noticable difference, the sound quality is still poor >>(actually about the same each way). >> >> > >This is probably because Asterisk calls sox to mix the separate incoming >and outgoing files into a single file. In order to mix two gsm files, >sox will need internally to convert them both to linear, do the mixing, >and then convert back to gsm. Since gsm is not a lossless compression, >the sound gets worse with each conversion round-trip. > >I'm not sure what you can do about it. Try wav again, which is supposed >to be linear. WAV and gsm are both GSM compressed. Or possibly you could >try signed linear explicity as a format (can't remember whether it is >sln or slin). > >Cheers >Tony > >We have tried it with and without the mixing option. Sox was not used. The recorded sounds are garbled sounding. There appears to be a 3-4 Hz signal in the audio that causes the amplitude to decrease momentarily for around 26ms at that rate. As I stated previously, this only happens when gsm is used on the phones. It is still present in the recording regardless of the three ways the recorded file is saved (gsm, wav, WAV). The problem is not the normal degradation of the gsm codec, it is much worse than that. Any other ideas? I can send a sample file to listen to if that would help. Thanks, Tom
Tony Mountifield
2005-May-04 13:19 UTC
[Asterisk-Users] Re: Audio quality problem recording calls using gsm codec
In article <427928FC.6070001@tidalwave.net>, xlab <xlab@tidalwave.net> wrote:> > > In article <42781D12.2050105@tidalwave.net>, xlab <xlab@tidalwave.net> > > wrote: > > > >>When using phones that are using G.711 codec and the calls are recorded > >>with "Monitor", when played back the files sound great. > >> > >>When we use gsm codec at one or both ends of the call, the recorded > >>files sound very bad. Much worse than the audio sounds during the call. > > > >This is probably because Asterisk calls sox to mix the separate incoming > >and outgoing files into a single file. In order to mix two gsm files, > >sox will need internally to convert them both to linear, do the mixing, > >and then convert back to gsm. Since gsm is not a lossless compression, > >the sound gets worse with each conversion round-trip. > > > We have tried it with and without the mixing option. Sox was not used. > The recorded sounds are garbled sounding. There appears to be a 3-4 Hz > signal in the audio that causes the amplitude to decrease momentarily > for around 26ms at that rate.Oh well, it was just a thought as I read your posting....> As I stated previously, this only happens when gsm is used on the > phones. It is still present in the recording regardless of the three > ways the recorded file is saved (gsm, wav, WAV). The problem is not the > normal degradation of the gsm codec, it is much worse than that. Any > other ideas? I can send a sample file to listen to if that would help.Sorry, but codecs are outside my area, and lack of time is a problem... Hope you find the solution Cheers Tony -- Tony Mountifield Work: tony@softins.co.uk - http://www.softins.co.uk Play: tony@mountifield.org - http://tony.mountifield.org