Is there a way to modulate my voice on the fly?
-
Install some necessary software:
sudo apt-get install sox libsox-fmt-pulse pavucontrol
-
Make a null-sink in pulseaudio:
pactl load-module module-null-sink
-
Start
sox
recording from the default recording device (default source) and outputing to the the null-sink:sox -t pulseaudio default -t pulseaudio null pitch -800
(If you don't want to record from the default source, change the above command accordingly.) The
-800
in the above command is the desired pitch change, you can modify that value as you want, e.g.-300
,+200
,+500
, etc. .sox
also have some other "effects" other than pitch changing which can be applied to the audio, you may want to check those out inman sox
. Start your capturing program (Skype, Teamspeak, etc.).
Start
pavucontrol
.-
While you capturing program is trying to capture it will show up in
pavucontrol
under the Recording tab. Change its recording source from the default to Monitor of Null Output. - Check the results, it should be working.
Notes:
-
You can make pulseaudio load the null-sink automatically, if you edit the
/etc/pulse/default.pa
file and add the following line to the end of that file:load-module module-null-sink
The changes you make in
pavucontrol
will be remembered, so the next time you start you capturing program it will automatically try to record from the null-sink. If this is not OK for you, then just change back the source to the default inpavucontrol
when you need.-
If you prefer the terminal way: You can set the recording source for your capture program in the terminal (without using
pavucontrol
), if you launch your program with thePULSE_SOURCE
variable set correctly. E.g. to launch skype recording from the monitor source of the null sink:PULSE_SOURCE=null.monitor skype
-
Changing the pitch of your voice doesn't give you very good privacy:
- If the other end knows you, knows you real voice, then you will have to alter the pitch a lot, so it will be obvious for the other end that you altered your sound. If he wants, he can capture your altered voice and change back the pitch. Or the other end may just ignore/reject your call for obvious reasons.
- If the other end doesn't know your real voice, well... In this case there is no real benefit from altering your voice, since they don't even know the real one.
- If you are trying to protect against someone intercepting your voice, a man-in-the-middle attack, etc. , then it is very likely that those malicious guys know quite enough to recover your real sound from almost any modification you do on it with such simple softwares.
- Also, for all the above cases: When you speak, it is not just the sound of your voice what can identify you, but the way you speak, your accent, the words and phrases you use, etc.
- If you want a more secure way for voice communication, you may want to use a text-to-speech engine to turn your typing into voice. That is a much more secure way. (Of course this might not be a possibility if it is not possible to type your messages, e.g. in a multiplayer game.)
Nevertheless, this method gives better privacy then no privacy at all. And it can be also fun to fool some friends with an altered voice.
You might want to check this out, its a java program that runs under linux and windows that does what you want. http://www.pitchtech.ch/PitchBox/