Discussion:
MP3 creation by IVR on 4.6
Jeff Pyle
2012-09-18 22:18:57 UTC
Permalink
Hello,

Where in the configuration files might one find the parameters that go into
MP3 creation by the IVR? I'd like to make some adjustments - a higher
bitrate for starters, perhaps even VBR if possible.


Regards,
Jeff
George Niculae
2012-09-18 22:28:10 UTC
Permalink
Post by Jeff Pyle
Hello,
Where in the configuration files might one find the parameters that go into
MP3 creation by the IVR? I'd like to make some adjustments - a higher
bitrate for starters, perhaps even VBR if possible.
Hi there,

I suggest you should add your record rate here:
/etc/sipxpbx/sipxivr/sipxivr.xml as


<type id="recordrate">
<enum>
<option>
<value>8000</value>
</option>
<option>
<value>16000</value>
</option>
<option>
<value>YOURVALUE</value>
</option>
</enum>
</type>

then restart sipxconfig and choose the record rate from UI

George
Jeff Pyle
2012-09-18 22:35:10 UTC
Permalink
Hi George,

Thanks for the quick reply!

The record rate (sample rate) is no issue. Through the web GUI I can
choose either 8khz or 16khz, as you indicate. I'm referring to attributes
unique to MP3 creation, specifically, the* *bitrate. This is related to
the audio compression in the MP3 encoding process.

I don't have a file up in front of me but I seem to remember it compresses
at 16 kbps (not to be confused with the 16 kHz sample rate). I'd like to
at least double that to 32 kbps, or as I mentioned, variable bitrate at a
selectable quality setting would be phenomenal.

Does that make sense? I'm trying to wring out some of the warble inherent
to a 16 kbps MP3. Efficient with filesize, but you pay for it in audio
quality.


- Jeff
Post by George Niculae
Post by Jeff Pyle
Hello,
Where in the configuration files might one find the parameters that go
into
Post by Jeff Pyle
MP3 creation by the IVR? I'd like to make some adjustments - a higher
bitrate for starters, perhaps even VBR if possible.
Hi there,
/etc/sipxpbx/sipxivr/sipxivr.xml as
<type id="recordrate">
<enum>
<option>
<value>8000</value>
</option>
<option>
<value>16000</value>
</option>
<option>
<value>YOURVALUE</value>
</option>
</enum>
</type>
then restart sipxconfig and choose the record rate from UI
George
_______________________________________________
sipx-users mailing list
List Archive: http://list.sipfoundry.org/archive/sipx-users/
George Niculae
2012-09-18 23:21:28 UTC
Permalink
Post by Jeff Pyle
Hi George,
Thanks for the quick reply!
The record rate (sample rate) is no issue. Through the web GUI I can choose
either 8khz or 16khz, as you indicate. I'm referring to attributes unique
to MP3 creation, specifically, the bitrate. This is related to the audio
compression in the MP3 encoding process.
I don't have a file up in front of me but I seem to remember it compresses
at 16 kbps (not to be confused with the 16 kHz sample rate). I'd like to at
least double that to 32 kbps, or as I mentioned, variable bitrate at a
selectable quality setting would be phenomenal.
Does that make sense? I'm trying to wring out some of the warble inherent
to a 16 kbps MP3. Efficient with filesize, but you pay for it in audio
quality.
Yep, it does. There are options to add in
/etc/sipxpbx/freeswitch/conf/autoload_configs/shout.conf.xml as

<param name="encode-brate" value="32"/>
<param name="encode-resample" value="44100"/>
<param name="encode-quality" value="0"/>

(support added with http://jira.freeswitch.org/browse/FS-1231)

didn't play with them, please report back with findings

George
Jeff Pyle
2012-09-19 02:17:11 UTC
Permalink
Post by George Niculae
Post by Jeff Pyle
Hi George,
Thanks for the quick reply!
The record rate (sample rate) is no issue. Through the web GUI I can
choose
Post by Jeff Pyle
either 8khz or 16khz, as you indicate. I'm referring to attributes
unique
Post by Jeff Pyle
to MP3 creation, specifically, the bitrate. This is related to the audio
compression in the MP3 encoding process.
I don't have a file up in front of me but I seem to remember it
compresses
Post by Jeff Pyle
at 16 kbps (not to be confused with the 16 kHz sample rate). I'd like
to at
Post by Jeff Pyle
least double that to 32 kbps, or as I mentioned, variable bitrate at a
selectable quality setting would be phenomenal.
Does that make sense? I'm trying to wring out some of the warble
inherent
Post by Jeff Pyle
to a 16 kbps MP3. Efficient with filesize, but you pay for it in audio
quality.
Yep, it does. There are options to add in
/etc/sipxpbx/freeswitch/conf/autoload_configs/shout.conf.xml as
<param name="encode-brate" value="32"/>
<param name="encode-resample" value="44100"/>
<param name="encode-quality" value="0"/>
(support added with http://jira.freeswitch.org/browse/FS-1231)
didn't play with them, please report back with findings
This is exactly what I was looking for.

mod_shout seems to use the Lame library so these options translate to lame
command line options, if one were familiar with those.

The "encode-brate" sets the encoder to use a fixed bitrate, specified in
kbps. Equivalent to the "-b" option on the lame command line. 8 kHz
sources can use any value 8-64 kbps at multiples of 8, while 16 kHz sources
can use 8-160 kbps on the multiples. I find 64 kbps to be an acceptable
improvement over the default for 16 kHz recordings. Similarly, 32 kbps for
8 kHz is just fine.

The "encode-resample" value forces the encoder to resample at the specified
rate. Equivalent to the "--resample" option on the command line. If you
don't set this, the sample rate of the resulting MP3 will be whatever is
set in the sipX web GUI / sipxivr.xml. Leaving it default makes sense to
me.

The "encode-quality" value sets the noise shaping and psycho-acoustic
algorithms of the encoder. mod_shout's default is 2, equivalent to a "-h"
high-quality setting on the command line. I don't see any reason to ever
change this. Setting it to 1 might squeak out a touch more fidelity, but
lame warns that it's "...slow and may not produce significantly higher
quality [than the default]." Point taken.

Unfortunately mod_shout doesn't appear support lame's variable bitrate
options. Bummer, that would have been fun.

The bottom line? I set the "Record rate" on the System -> Voicemail page
to 16000, and I added one line
to /etc/sipxpbx/freeswitch/conf/autoload_configs/shout.conf.xml:

<param name="encode-brate" value="64"/>

Life is good. A 64 kbps MP3 @ 16 kHz and a 32 kbps MP3 @ 8 kHz are a
quarter the size of their WAV equivalents with a quality high enough most
folks can't hear any compression artifacts at all. Works for me.


- Jeff
George Niculae
2012-09-19 07:04:20 UTC
Permalink
Post by Jeff Pyle
quarter the size of their WAV equivalents with a quality high enough most
folks can't hear any compression artifacts at all. Works for me.
Glad it worked. If you feel we should expose these as settings in UI
please raise a JIRA and will schedule for next releases

George
Jeff Pyle
2012-09-19 13:43:18 UTC
Permalink
Post by George Niculae
Glad it worked. If you feel we should expose these as settings in UI
please raise a JIRA and will schedule for next releases
Done. http://track.sipfoundry.org/browse/XTRN-1073


- Jeff
George Niculae
2012-09-19 14:29:34 UTC
Permalink
Post by Jeff Pyle
Post by George Niculae
Glad it worked. If you feel we should expose these as settings in UI
please raise a JIRA and will schedule for next releases
Done. http://track.sipfoundry.org/browse/XTRN-1073
Thanks, moved to proper project http://track.sipfoundry.org/browse/XX-10452
(XTRN is for external components)

George

Loading...