[Freeswitch-users] Module Mod Native File - How to handle multiple rates under the same codec.
Keith Laaks
keithl at voxtelecom.co.za
Mon Mar 16 10:25:06 PDT 2009
Hi,
To minimize/eliminate transcoding, I am using mod native file, with a
set of transcoded prompts with the appropriate set of file extensions.
Everything works as advertised when using the traditional codecs such as
pcma, g729, gsm.
But speex support is a bit of a challenge.
Freeswitch supports: speex at 8000h@20i, speex at 16000h@20i,
speex at 32000h@20i.
When I setup calls using these various codec flavors, I can see using
info (and of course detect by ear) that indeed the call is running at
the different 'rates'.
I see that regardless of which one I use, the "variable_read_codec" and
"variable_write_codec" remains "SPEEX", but depending on the flavor, a
"variable_read_rate" and "variable_write_rate" of either 8000,16000 or
32000.
But when I try play a file when in 16000 or 32000, I get:
2009-03-15 16:31:13 [INFO] mod_native_file.c:81 native_file_file_open()
Opening File
[/usr/local/freeswitch/sounds/en/us/callie/all/16000/SUCCESS.SPEEX]
8000hz
2009-03-15 16:31:13 [WARNING] switch_core_file.c:119
switch_core_perform_file_open() Sample rate doesn't match.
I created my SPEEX files using: speexenc -w <infilename> <outfilename>
(note the -w option for 16kHz wideband)
So, even though the call is setup using a wideband 16kHz codec, it
appears that mod native file is expecting a 8kHz file for all the SPEEX
flavors.
What am I missing here? Is this module limited to 8KHz rates? I am on
1.0.trunk (12530M).
I have not yet looked at these codecs: G7221 at 16000h, G7221 at 32000h,
CELT at 32000h, CELT at 48000h, but as these also have multiple rates for the
same codec - I expect same issue.
I am using ${ variable_read_rate } in the filename path, so fs looks at
a set of files encoded with a matching sample rate.
But looks like it's always looking for a 8KHz file.
If you have had any experience with this, please let me have your
advice.
Thanks
Keith
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20090316/f4c71603/attachment-0002.html
More information about the FreeSWITCH-users
mailing list