I need a way to modulate my voice on-the-fly (to lower or raise pitch, etc, for privacy) for use in Mumble, TeamSpeak and other such programs. Is there any way to do this under Linux/Ubuntu?
I have found a couple possible programs under Windows, and if necessary I could run Mumble, TeamSpeak, etc. under VirtualBox/Wine along with a modulator, but I would far prefer to use Linux, although I have not been able to find any native programs for Linux that can do this during my quick Google search.
(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 in man sox.
Start your capturing program (Skype, Teamspeak, etc.).
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.
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:
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 in pavucontrol 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 the PULSE_SOURCE variable set correctly. E.g. to launch skype recording from the monitor source of the null sink:
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.