About

It's a module that uses the soundtouch library, which can do pitch shifting and other audio effects, so you can pipe the audio of a call(or any other channel audio) through this module and achieve those effects. You can specifically adjust pitch, rate, and tempo. Please note this documentation is only accurate for versions >= 1.0.2 or r9820 and greater.

Configuring

Usage

Initial values and what leg to hook are specified in your dialplan, afterwards if you enable the DTMF hooking you will be able to interact with it through the keypad. The soundtouch module can only interact on one leg of a session at a time. By default it hooks the recv leg, which means that if you call someone else it will hook your side and modify your voice that they hear. It is important to keep in mind that during the initial specification you can specify the pitch either absolutely or by octaves or semitones. Each will override the other, so setting more than one is pointless.

You are now able to use mod_soundtouch. The API spec is:

[send_leg] [hook_dtmf] [-]<X>s [-]<X>o <X>p <X>r <X>t

Dialplan Usage

One can use this in a dialplan before a bridge/etc by:

 <action application="soundtouch" data="hook_dtmf -0.3o 0.8r"/>

Api Usage

soundtouch <uuid> [start|stop] [send_leg] [hook_dtmf] [-]<X>s [-]<X>o <X>p <X>r <X>t

DTMF Interaction

Once the module has been activated on a session if you specify the hook_dtmf option it will also hook the DTMF's for whatever direction it applies to (ie if applies to send_leg it hooks the send's dtmf's.
The dtmf binds can then be used to interact with the application:

Use in Lua

To start soundtouch in Lua use for example (this will lower the voice pitch by 0.2 octaves):

session:execute("soundtouch", "-0.2o") 

To reset the pitch to normal, this method will NOT work:

session:execute("soundtouch", "+0.2o") 

Even this will NOT work

session:execute("soundtouch", "0o") 

You will need to explicitly "stop" soundtouch by the following command

session:execute("soundtouch","stop")

You can subsequently do pitch/rate shifting again by issuing a fresh command e.g.

session:execute("soundtouch","0.8r") 

See Also