Linux Voice Changer

broken image


PitchBox is a small software application for transforming your voice or music in real-time.

PitchBox was developed for shows and exhibitions, and was hence tuned for that purpose. As such, most of the efforts have been done in proposing ear-catching and attractive audio effects, and on reducing the latency as much as possible. On the other hand, fewer efforts have been done in making it easy to install and setup, or in the amount of features it provides.

  1. I've been looking for a while to try and find a real time voice changer for Linux (Specifically Ubuntu). I usually edit my voice in Audacity when I want to change it but recently I have found myself in the need of a real time voice changer. Any suggestions would be much appreciated!
  2. Real Time Microphone Voice Changer App. Works with On-Line Games and VideoConferences! Debian/Ubuntu: sudo apt-get install sox python3-pyqt5. Centos/RedHat: sudo yum install python3-qt5 sox. Arch: sudo pacman -S python-pyqt5 sox. Sudo pip install pyvoicechanger Run: pyvoicechanger.py. Python 3.6+ PyQt 5.10+ Sox (Linux package).

PitchBox is a small software application for transforming your voice or music in real-time. PitchBox was developed for shows and exhibitions, and was hence tuned for that purpose. As such, most of the efforts have been done in proposing ear-catching and attractive audio effects, and on reducin. And where other voice changers are going algorithmic routes, MorphVox Pro's voices have been taken from real people, uniquely. So it might be worthwhile to give MorphVox Pro another go in Linux. MorphVox Pro has been on my Windows 7 laptop for at least a year (if not more).

If you want to use the audio effects of PitchBox within an audio editor, most of them are available as LADSPA and VST plugins.

Screenshot
Windows
  • Windows 98 or greater
  • Java Runtime Environment (JRE) version 5 or greater. The latest JRE can be downloaded at http://www.java.com (it's free!)
  • Optional but strongly recommended for low latency: A sound card with a native ASIO driver, or the generic ASIO4ALL driver.
  • Kernel 2.6 or greater
  • Java Runtime Environment (JRE) version 5 or greater. The latest JRE can be downloaded at http://www.java.com (it's free!)
    • Ubuntu users: the JRE is best installed using the synaptic package manager
    • As of writing this page, gcj still has some problems with PitchBox. Use the Sun JVM or the OpenJRE instead if possible.
Other

PitchBox should run on any other system for which the Java Runtime Environment version 5 or greater is available (Mac OS X, Solaris, etc). However, audio is recorded and played using JavaSound rather than using a native library, and hence you may not be able to achieve low latencies.

PitchBox.zip (2.32MB, version 2.0.2)

Warning PitchBox is not easy to setup, especially for real-time voice transformation. It requires understanding of the Larsen effect, and knowledge of audio and microphone setup in general. Please carefully read the advices in the Installation and Setup section below.
Installation and Setup

If the JRE is properly installed (see requirements), you should be able to start PitchBox just by double-clicking on the PitchBox.jar file, or by using the context-menu 'open with..' and choosing the Java runtime. In the application,

  • Click on the 'Audio In' check box to transform audio from any audio input (microphone, line-in) in real-time
  • Click on the 'File' check box to open and transform audio from a music file (.mp3, .wav, etc)
  • Choose the effect you want in the 'Audio effect' panel. 'Normal' is the default one and plays the audio unmodified
  • Depending on the effect, you can modify additional parameters in the 'Controls' panel while the audio is being processed
Choosing the audio input for real-time transformation

When 'Audio In' is selected, PitchBox transforms audio in real-time from the default audio input port. It will not automatically select the microphone input, or let you choose the audio input to use. It will also not adjust the volume automatically.

Hence, you have to manually choose and setup the correct audio input port (microphone, line-in) using the setup tools of your operating system or sound card.

  • On Windows, this is usually found in menu 'Start/Settings/Control Panel/Sound', then by choosing the 'recording' tab.
  • On Linux, this is usually done using the 'alsamixer' command-line, or any graphical tool based on it. On Ubuntu you can usually open it by clicking on the loudspeaker icon in the top right corner of the screen.
The proper way to setup the audio input widely differs from on system to another and from one sound card to another and it is hence not possible to provide any precise user guide. Just a few hints:
  • The recording level should be adjusted such that the level-meter in PitchBox (top center of the window) goes to about 3/4 when speaking. If it results in a too loud or too soft sound, then adjust the playback volume.
  • Never use the 'stereo mix' input port with PitchBox (or with any record->process->play application)
  • Most audio input ports (microphone, line-in) sometimes also appear in the 'Playback' tab. Usually, the levels must be left to minimum (or mute) here, because they correspond to the 'monitor' level, which is played unmodified and without going through the audio applications.

When trying to transform your voice from the microphone, audio feedback (high frequency loud tones, known as Larsen effect) may occur, especially when using the build-in microphone of most today's laptops.

Audio feedback occurs because the microphone records some sound, which is transformed, amplified and played to the loudspeaker a few milliseconds afterwards. This amplified sound is recorded itself again by the microphone, and then transformed, amplified and played again, and this loop continues again and again. You get the picture.

Audio feedback cannot be prevented by the application, and may occur in any system with a real-time record->amplify->play loop. A few hints to prevent audio feedback:

  • Reduce the playback volume. In general, as soon as the microphone re-records the amplified sounds at a lower volume than the original ones, audio feedback disappears. You may still get echoes or resonances if the volume is too close to the critical level.
  • Use headphones for playback.
  • Use a directional microphone (aka uni-directional, supercardioid or cardioid) instead of an omni-directional one (most built-in laptop's microphones are omni-directional). Then make sure the microphone does not point in the direction of the loudspeakers. Ideally, the loudspeakers must be behind the microphone.
  • Place the microphone as far as possible from the loudspeakers
Achieving low latency

With some effects, you may notice that the transformed voice is not played immediately, but about 1/4 seconds after you speak, which is annoying, isn't it? This small delay is named latency, and is caused by several factors. Furthermore, it depends on the effect itself. PitchBox has been designed to allow most effects to run at low latencies, by following the advices below:

Within PitchBox,

  • set the mode to Voice for effects that have a 'mode' parameter. Note that while the voice mode achieves the lowest latency, it also has the lowest quality. When processing a file, you should set the mode to music to get the highest quality.
  • click on the 'Settings' button, and
    • reduce the 'block size' parameter. Lower values decrease the latency, but also need more CPU power and accuracy from the operating system. With too low values you will begin to hear clicks, buzz-like sounds, or the processing may simply stop with an error. You may need several tries before finding the lowest value that works on your system.
    • change the 'buffers' parameter (Linux only)
    • change the 'sample rate' (some sound cards do not support 44100 or 48000Hz natively, and the driver does a software resampling that may add latency)

On Windows there is only one additional, but strong recommendation: use a sound card that has native ASIO support, or use the generic ASIO4ALL driver (see requirements). Without ASIO, the latency will remain very high regardless of how you change the settings of PitchBox.

On Linux, the application attempts to run at real-time priority, which significantly helps in achieving low latencies. However, some distributions such as Ubuntu do not allow applications launched by a non-root user to switch to real-time priority by default. In that case: Edit a video on pc.

  • Create a new group named 'audio' (if not already present), and add your account (or the account from which PitchBox is launched) to this group
  • Edit the file /etc/security/limits.d (you need to do this with root privileges) and add the following lines at the end of the file:
    @audio - rtprio 99
    @audio - nice -10
  • Reboot
Linux live voice changer

Linux Voice Changer Settings

With laptops in general, there are usually power scheme choices such as 'high performance', 'power saver', etc. Open email in word. In that case, it may help to choose something like 'high performance' or similar rather than 'power saver'.

On 'good systems' and with proper settings, you should be able to get a total latency

  • below 10ms for 'Normal', 'Flanger', 'Graphic Eq', 'Detune', 'Miserablize', 'Distort', 'Zombify'
  • below 20ms for 'Echo', 'Pitch Shift', 'Whisperize', 'Ghost Dance', 'Thor', 'Vocoder' in Voice mode
  • below 30ms for 'Robotize', 'Water', 'Octaver', 'PitchScrew' in Voice mode, and 'Pitch Shift', 'Thor', 'Vocoder' in Mixed mode
Unfortunately, I'm afraid I'm unable to tell you what a 'good system' is for PitchBox, as it depends on too many factors that are hardly ever documented. Except perhaps that you need at least a 1.2GHz CPU.
Sorry Prof. Drake, I couldn't finish my homework

This happens if you computer is too slow to process audio with the chosen effect and buffer size settings. As each effect has different requirements in terms of CPU power, this error may only show up for some effects. Also note that you may sometimes hear a lot of clicks or a buzz-like sound, sign that the computer is too slow as well, without the message appearing.
If this occurs, here's a few hints:

  • Click on 'Settings', and try
    • increasing the buffer size
    • increasing the buffers (Linux only)
    • setting the 'Mode' to 'Mixed mono' instead of 'Stereo'
  • If you use a laptop, check that the power scheme (if any) is set to 'high performance' (or similar) rather than 'power saver' (or similar)
  • If your CPU is less than 1Ghz, there may not be a solution. Some effects just require a lot of CPU.

This happens if the settings are not supported by your sound card driver or by the operating system.
The simplest solution is to click on the 'Settings' button, and then on 'Reset' and 'OK' in the settings dialog box. This restores the default audio device settings, which are compatible with almost all systems.

Alternatively, click on the 'Settings' button, and then change the following in the settings dialog box:

  • Unless you are working on Windows with a sound card that has native ASIO support, set 'Rec. chan' and 'Play chan' to 0. Any other value is unlikely to work.
  • Try changing the 'Buffer size' parameter. Most drivers do not support the lowest or highest values. Values around 1024 should be supported on most systems.
  • Try changing the 'Sample rate' or 'Buffers' parameters (although this is unlikely to make a change)
  • When transforming voice in real-time, check that the driver for your sound card actually supports recording and full-duplex (recording and playing at the same time). This may not be the case on Linux, especially with recent sound cards. If not supported, you can only transform audio from music files.
I cannot hear any sound
  • Click on the current effect button again to restart processing.
  • Make sure you have checked 'Audio in', or you have checked 'File' and chosen an audio file
  • If an error is displayed, see the sections above
  • If the level meter of PitchBox (top center of the window) is animated when processing from a music file and you still hear nothing, I'm afraid the problem is not due to PitchBox, but to the audio setup of your system. Welcome to the messy world of computer audio!

Linux Voice Changer






broken image