[Home]

Summary:ASTERISK-06760: [patch][post 1.4] app_voicechanger.c
Reporter:Clod Patry (junky)Labels:
Date Opened:2006-04-11 18:05:06Date Closed:2011-06-07 14:02:46
Priority:MajorRegression?No
Status:Closed/CompleteComponents:Applications/General
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) patch-asterisk-voicechanger-svn-style.patch
Description:With this asterisk application, it allows users to make an outbound call and change their voice.
That application will change the pitch and the voice could be really deep, really high, or normal.

I gave a little demo at VON Canada/TAUG and says it will be available really soon, so im posting it before Friday, hope this can jump in 1.4.


Setup:
cd /usr/src
wget http://www.hut.fi/u/oparviai/soundtouch_v1.3.0.zip
wget http://www.lobstertech.com/voicechanger/SoundTouch-1.3.0-C_FrontEnd-0.1.patch

# Apply our patch to SoundTouch, build, and manually make a Shared Object
unzip soundtouch_v1.3.0.zip
cd SoundTouch-1.3.0
patch -p1 <../SoundTouch-1.3.0-C_FrontEnd-0.1.patch
./configure && make && make install
cd source/SoundTouch/
g++ -shared -fPIC -o libSoundTouch.so *.o
cp libSoundTouch.so /usr/lib

then just copy your app in apps/ and do the normal procedure.

When using, hitting the '#' will deeper the voice and hitting '*' will higher the voice

   -- Executing VoiceChangeDial("SIP/10-6da3", "Zap/1/5015096|6.0|120|S(-5)") in new stack
(when pressing '#')
Apr 11 19:14:02 NOTICE[4066]: app_voicechanger.c:225 ast_bridge_audio: pitch is now at (5.000000)
Apr 11 19:14:03 NOTICE[4066]: app_voicechanger.c:225 ast_bridge_audio: pitch is now at (4.000000)
Apr 11 19:14:03 NOTICE[4066]: app_voicechanger.c:225 ast_bridge_audio: pitch is now at (3.000000)
Apr 11 19:14:03 NOTICE[4066]: app_voicechanger.c:225 ast_bridge_audio: pitch is now at (2.000000)
Apr 11 19:14:03 NOTICE[4066]: app_voicechanger.c:225 ast_bridge_audio: pitch is now at (1.000000)
Apr 11 19:14:04 NOTICE[4066]: app_voicechanger.c:225 ast_bridge_audio: pitch is now at (0.000000)
(0 is normal)
Apr 11 19:14:04 NOTICE[4066]: app_voicechanger.c:225 ast_bridge_audio: pitch is now at (-1.000000)
Apr 11 19:14:04 NOTICE[4066]: app_voicechanger.c:225 ast_bridge_audio: pitch is now at (-2.000000)
Apr 11 19:14:04 NOTICE[4066]: app_voicechanger.c:225 ast_bridge_audio: pitch is now at (-3.000000)
Apr 11 19:14:04 NOTICE[4066]: app_voicechanger.c:225 ast_bridge_audio: pitch is now at (-4.000000)
Apr 11 19:14:04 NOTICE[4066]: app_voicechanger.c:225 ast_bridge_audio: pitch is now at (-5.000000)
Apr 11 19:14:05 NOTICE[4066]: app_voicechanger.c:225 ast_bridge_audio: pitch is now at (-6.000000)



****** ADDITIONAL INFORMATION ******

That application works with the libSoundTouch.

That application was originally written by Justin Tunney (jtunney) and we have discussed to release it with asterisk.

More information could be found on:
http://www.lobstertech.com/voicechanger/

Note: will cause hours of fun with friends. :)
Comments:By: Tilghman Lesher (tilghman) 2006-04-11 18:18:31

Licensing note:  SoundTouch is released LGPL, so this could go into main SVN.

By: Olle Johansson (oej) 2006-04-12 02:02:55

We need a patch for makefile as well.

By: Olle Johansson (oej) 2006-04-12 02:03:22

...and a readme with the above installation instruction...

By: Justin R. Tunney (jtunney) 2006-04-12 10:12:09

Ah, we finally got it up

By: Justin R. Tunney (jtunney) 2006-04-12 10:20:56

I just uploaded libsoundtouch4c which is a C front-end for SoundTouch (duh) that anthm wrote.  It allows you to avoid the hassle of patching soundtouch manually.

app_voicechangedial.c uses libsoundtouch4c and has more features.  The last time I checked, I was having problems with DTMF with bleeding edge Asterisk.

By: Clod Patry (junky) 2006-04-13 09:55:18

After a quick discussion with Justin, we'll release it like this, since we're using that exact version and it works very well.
All we want, is that app included in the final freeze.

By: Olle Johansson (oej) 2006-04-13 10:27:17

We still need the makefile and the patch for the makefile. Thanks!

By: Justin R. Tunney (jtunney) 2006-04-13 16:58:37

Is the patch I uploaded up to par?

I don't think we have time at the moment to rip out the guts of SoundTouch and integrate it directly in to the application, or a similar, more streamlined approach.... So I wrote a make rule to check if libSoundTouch.so exists, if so it compiles app_voicechanger.so.

I also included doc/voicechanger.txt to document getting the hacked version of SoundTouch on your computer with the C front-end.

By: darkskiez (darkskiez) 2006-04-18 08:09:00

I'd think this'd work better if you could press say, 1 thru 9 to select a pitch, say 5 being normal, maybe pressing 0 could alternate between on/off with some beep to acknowledge it. Using a phone and pressing * and # you cant see the asterisk log so you have no idea what state it is in.

I tested this a couple of times and it was fine. It didnt work and crashed asterisk when the call hungup when I used the 't' flag(which I have no idea what it does or why i'd use it, I was trying it to figure this out).

#0  ast_threaded_bridge_run (obj=0xbd7f9534) at app_voicechanger.c:95
95                      if (!(f = ast_read(tbo->chan)))

(gdb) bt full
#0  ast_threaded_bridge_run (obj=0xbd7f9534) at app_voicechanger.c:95
       f = (struct ast_frame *) 0x81c36f8
       showedWarning = 0
       res = 0
#1  0x40025e51 in pthread_start_thread () from /lib/libpthread.so.0
No symbol table info available.
#2  0x401ed92a in clone () from /lib/libc.so.6
No symbol table info available.

By: Justin R. Tunney (jtunney) 2006-04-18 14:03:37

Thank you for the testing darkskiez.  You're right that DTMF pitch changing could be improved and I will probably take your advice on that one.

As for threaded mode, that is removed in newer revisions of the voice changer and I honestly don't know why I didn't strip it out for this patch.  It doesn't surprise me that it crashed your box; heck, the thread mode doesn't even support real-time pitch alterations.

By: Denis Smirnov (mithraen) 2006-08-11 19:49:02

Can this be modified, for use code from app_dial.c for supporting similar to dial functions?

Or modify app_dial for adding posibility to using any code for voice processing?

By: Clod Patry (junky) 2006-08-12 06:58:06

maybe, but the problem we use libsoundtouch.

By: Telecom & Internet Integrated Solutions (teleweb) 2006-08-12 23:21:14

Why do you even care to create a webpage if it doesn't work with the world's most used browser?!
Wake up, IE is a very good choice again nowadays, and even the most harsh critics have to admit that IE7 is well on its way to regain the market share lost to firefox.

http://www.lobstertech.com/voicechanger/
"Internet Explorer users are not welcome on this website. You are a horrible person for using Internet Explorer."
etc. etc...

You are a horrible person by saying such a thing. Apart from containing a lot of bullshit, your text insults IE users of "not caring". Well, you couldn't be more wrong, I care a lot, and I've used and tested all major browsers available (Netscape, Mozilla/Firefox, Opera) but decided that none of them justified switching. So I use IE as a conscious decision, and you're just being an asshole for not letting a great supporter of asterisk (which I definitely am) enjoy your contribution.

Why do you think that so many businesses and PC users are reluctant to join the linux/OSS community? Because of jerks like you!  By posting a full page insulting IE users on your website, you clearly show that you are a fanatic, and it's time that we get rid of people like you, because you scare a lot of people off.



By: Clod Patry (junky) 2006-08-13 08:16:13

teleweb: You blame and insult people for our opinions and that kind of post isnt nor appropriate, nor tolerate here.

Thanks.

This is a place for development and testing patches, so how that patch applied to your system?

By: Olle Johansson (oej) 2006-10-30 10:26:21.000-0600

Where are we with this? ready, disclaimed, go?

Is Anthms piece of code also disclaimed?

By: Leif Madsen (lmadsen) 2006-11-02 15:03:24.000-0600

Could this code be modified eventually to control gain as well? Perhaps it could create a VOLUME() function?

By: Clod Patry (junky) 2006-11-03 10:04:16.000-0600

no, tony's code isnt disclaimed.

VOLUME() function seems a good idea, let's talk about that concept on IRC.

By: Andreas Anderson (aanderson) 2007-01-24 06:20:58.000-0600

Is there an update to 1.4 or trunk? This is a very fun feature... ("Darth Vader calling on line one") ;-)

By: Clod Patry (junky) 2007-01-24 12:32:39.000-0600

patch will be available really soon.

housekeeping: Where do we go with that app?

By: Andreas Anderson (aanderson) 2007-02-14 08:15:27.000-0600

*bump*

any news on this? i'll take everything, alpha, beta, patches for 1.4 trunk or branches ;-)

By: Clod Patry (junky) 2007-03-01 11:45:59.000-0600

galium: see http://www.lobstertech.com/voicechanger/
There's a port for 1.4.

Since that patch is idling for like 1 year, we will not maintain this for current trunk, this taking to much time to maintain stuff, which is not commited yet.