Asterisk Voice Changer

October 31, 2005

Originally Posted 1117 Days Ago Article Tags « asterisk c »
[Photo of a deranged cat]

This program is a voice changer module for Asterisk. This allows you to change the pitch of your voice, or the voice of the called party in realtime, when making phone calls. If you are not familiar with Asterisk or Linux then you might want to check out this page instead.

The application, VoiceChangeDial, functions as a Dial() replacement. Although the behavior of this application seeks to mimic Dial(), it is not perfect due to the fact that Asterisk does not properly abstract dial and bridging functionality.

exten => 666,1,Set(CALLERID(all)=${BULLY_FROM_HIGHSCHOOL})
exten => 666,2,VoiceChangeDial(SIP/BandwidthDotCom/${GEORGE_W_BUSH}|T(30)P(-5.0)D(8:9)H(*))
; ToDo: Say bad things

Download

[zip] voicechanger-0.6-RC1.tar.gz (16KB, Released 2007-07-05)
[zip] voicechanger-0.5.tar.gz (30KB, Released 2006-10-07)
[zip] voicechanger-0.4.1.tar.gz (30KB, Released 2006-10-07)
[zip] voicechanger-0.4.tar.gz (28KB, Released 2006-08-23)
[txt] ChangeLog (3KB)

Updates

  • 2008-06-12: Forked soundtouch because it symlinks files in /usr/share that are only present on systems with autoconf and libtool installed. This should now install for everyone without trouble.
  • 2008-03-08: Damn soundtouch people changing filenames and can't give a playa a 301 redirect ugh
  • 2007-07-05: The new 0.6 release is Asterisk 1.4 compatible! It's about time! You also must upgrade to the latest version (0.4 or higher) of libsoundtouch4c for this new release. The latest libsoundtouch4c release hopefully fixes a bug where some people get screaching static. The voice changer is also more customizable!
  • 2006-10-07: New release 0.5. Read the ChangeLog! Lots of important stuff!
  • 2006-10-07: Bug fix release 0.4.1, see ChangeLog. I will have a version that is compatible with Asterisk 1.4 once a stable release is made.
  • 2006-08-26: Snakes on a Plane was entertaining and... gross. New version of libsoundtouch4c!
  • 2006-08-25: I no longer recommend SoundTouch 1.3.1 because it does not compile out of the box for me as well as a few other people. You can find instructions below for installing 1.3.0. People are also having some problems with libsoundtouch4c's build system. I will rewrite this tonight after I go rot my brain watching Snakes on a Plane!
  • 2005-11-24: The patch has been modified to fix the caller id issues some people were having. Great progress has been made on 0.3, expect a release in about a week if not less. I've also added CVS access for those of you who do not want to wait for releases.
  • 2005-11-18: Two users seem to be having issues using the voice changer with a PRI channel. Next week, once I get the hardware necessary, I will attempt to reproduce and fix this problem.
  • 2005-11-17: Claude Patry has been putting forward his time and expertise to help me with the voice changer software. Thanks! In the next few releases you can expect some of the following features: installing the voice changer to the peer channel, adjusting pitch with # and *, playing programmable sound files with DTMF digits, static, distortion, etc.
  • 2005-11-14: Version 0.2 Released! Although certain parts of the code are still a bit flakey (See Bugs), this revision is far more stable and usable. (Look ma! No core hacking!) The links in the download section have been updated.
  • 2005-11-11: I've just managed to encapsulate all of the voice changer in to a single application so that no dirty core hacking will be needed. We also will not have to worry about voice packets going directly between hosts and the codecs being used by the channel. I will upload this version as soon as I test it out in a production environment (Me prank phone-calling a friend, hehe).
  • 2005-11-09: Matt Riddell has just plugged this page on his Asterisk Daily News site. Be sure to check it out and thanks Matt!
  • 2005-11-09: Anthony Minessale II has been so kind as to send me a barebones Dial replacement called 'CallForward' off of which to base the Voice Changer so that no core hacking will be needed. Thanks!

Installation

On your functioning Linux machine running Asterisk with the header files installed to /usr/include/asterisk (on Ubuntu, if you installed asterisk through your package manager, also install asterisk-dev) run the following commands to install the voice changer as well as its two dependencies:

# install SoundTouch 1.3.1-jart
# you can also install it through your package manager
cd /usr/src
wget http://www.lobstertech.com/code/libsoundtouch4c/releases/soundtouch-1.3.1-jart.tar.gz
tar xvzf soundtouch-1.3.1-jart.tar.gz
cd soundtouch-1.3.1-jart/
./configure --enable-integer-samples --prefix=/usr
make
make install

# install libsoundtouch4c
cd /usr/src
wget http://www.lobstertech.com/code/libsoundtouch4c/releases/libsoundtouch4c-0.4.tar.gz
tar -xzvf libsoundtouch4c-0.4.tar.gz
cd libsoundtouch4c-0.4
./configure --prefix=/usr
make
make install

# install the voice changer
cd /usr/src
wget http://www.lobstertech.com/code/voicechanger/releases/voicechanger-0.6.tar.gz
tar -xzvf voicechanger-0.6.tar.gz
cd voicechanger-0.6
make
make install

# load it in to asterisk
make start

Documentation

  -= Info about application 'VoiceChangeDial' =- 

[Synopsis]
Voice Changer Dial Application

[Description]

Usage VoiceChangeDial(dialstring[|options])

Usage:
  This app fuctions pretty much the same way as Dial() only you can do
  cool stuff like change the pitch of your voice.  Please note that
  pitch changes are not very sophisticated, this will not make a man
  sound like a woman or vice versa.  It will however do a great job of
  masking your voice by making you sound either like a chimpmunk or
  Jabba the Hut.

  Because this application needs to mangle voice data, it will need to
  pass through Asterisk back-to-back.  This means that if you are
  switching SIP, the RTP will not pass from phone to phone, but will
  be proxied through Asterisk.  Therefore, VoiceChangeDial() will use
  considerably more CPU and bandwidth than a normal Dial() operation.

Options:
  p    -- Apply effect to peer channel instead
  P(f) -- Voice pitch in semitones.  Negative is lower, positive
          is higher.  Default is -5.0
  T(n) -- Dial timeout in seconds.  If not set, waits 60 sec.
          for other side to pickup
  D(down:up[:delta]) -- Allow pitch changes during conversation by
          pressing DTMF keys 'up' and 'down' with a semitones change
          of 'delta'.  Examples:  D(*:#:5.0), D(1:2).  The default
          delta is 5.0 semitones.
  H(x) -- Allow caller to hangup the peer by pressing '*'.  This
          is different from the behavior of 'h' in previous
          releases of the voice changer.  This option trumps 'd'
  S(x) -- Allow peer to hangup themself by pressing DTMF digit 'x'.
          Mnemonic is 'suicide'.
  d    -- **DEPRECATED** Allow pitch changes during conversation with
          '*' and '#'
  h    -- **DEPRECATED** Allow caller to hangup the peer by pressing
          '*'.  This is different from the behavior of 'h' in previous
          releases of the voice changer.  This option trumps 'd'
  s    -- **DEPRECATED** Allow peer to hangup themself by pressing
          '*'.  Mnemonic is 'suicide'.  This option trumps 'd'

Recommended Invocation:

  VoiceChangeDial(SIP/bandwidth/+12036660420|T(30)P(-5.0)D(8:9)H(*))

    This will wait 30 seconds for the called party to pickup, make
    voice sound lower, and allow you to change your voice down and up
    with digits '8' and '9'.  You may also hang up the call with '*'.

Legal

Asterisk Voice Changer
Copyright (c) 2005-2007 Lobstertech, Inc.
Keep it Open Source Pigs

The program found on this page is free software and may be used, distributed, and modified under the terms of the GNU General Public License version 2.0.

This software is distributed in the hope that they will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

Comments

  1. Excellent Work!

    Jean-Luc Picard on August 27, 2008 // Permalink
  2. So cool I should be sleeping but I am talking to my self :)

    m31uk3 on October 7, 2008 // Permalink

Post Comment