Asterisk Realtime Voice Pitch Changer


Interesting little app.

[quote] I just threw together a voice changer for Asterisk using the SoundTouch Library. Now we can all finally change the pitch of our voices and creep out friends/family. If you are not familiar with Asterisk or Linux then you might want to check out this page instead.

SoundTouch is unfortunately a C++ only library (HERESY!), so I had to hack the source to that as well… All that was really needed was to add class wrapper functions that ‘export “C”’ and create a .so file because it was generating a ‘.la’ file or some esoteric C++ bullshit.

Then I started hacking Asterisk. I added a pointer to ast_channel to hold the SoundTouch object pointer. In channel.c I added code to ast_write() that will detect if a SoundTouch object has been set, and if so, will change the voice data in the ast_frame structure. Then I created app_voicechange.c which allows us to install a SoundTouch object for voice changing on the channel. Finally, I modified app_dial.c to transfer the SountTouch object to the peer channel so that they will hear MY voice changed.

Please note that this will be of no use if you’re connecting IAX or SIP calls because the UDP/RTP data is sent directly between hosts. One hack I use with my Junction Networks account is to have the call come in through IAX and go out through SIP. Furthermore, this will also not work with GSM because I’ve only figured out how to implement support for ULAW, ALAW, and slinear.[/quote]