Installation#

Install Manim Voiceover from PyPI with the extras azure and gtts:

pip install --upgrade "manim-voiceover[azure,gtts]"

Check whether your installation works correctly:

wget https://github.com/ManimCommunity/manim-voiceover/raw/main/examples/gtts-example.py
manim -pql gtts-example.py --disable_caching

Important

Manim needs to be called with the --disable_caching flag due to a bug. Don’t forget to include it every time you render.

The example above uses gTTS which calls the Google Translate API and therefore needs an internet connection to work. If it throws an error, there might be a problem with your internet connection or the Google Translate API.

Extras#

Manim Voiceover does not install all dependencies by default. It will detect on the fly which packages are missing and will ask for your permission to install them, so you don’t have to worry about installing them manually.

If you want to install all of the dependencies, use the all extra:

pip install --upgrade "manim-voiceover[all]"

You can see other extras in the pyproject.toml file.

Installing PortAudio#

Manim Voiceover lets you record voiceovers during rendering using PyAudio. PyAudio depends on PortAudio which needs to be installed separately.

On Debian based distros:

sudo apt install portaudio19-dev
sudo pip install pyaudio
# Or install from apt globally:
sudo apt install python3-pyaudio

On macOS, you can install it using Homebrew:

brew install portaudio
pip install pyaudio

On Windows, PortAudio should come prepackaged with the binaries, so just install PyAudio with pip:

python -m pip install pyaudio

For more information, see the PyAudio documentation.

Installing SoX#

Manim Voiceover can make the output from speech synthesizers faster or slower using SoX (version 14.4.2 or higher is required).

Install SoX on Mac with Homebrew:

brew install sox

Install SoX (and a necessary mp3 handler) on Debian based distros:

sudo apt-get install sox libsox-fmt-all

Or install from source.

Installing gettext#

Manim Voiceover uses gettext to store and fetch translations of voiceover text. If you plan to translate your videos automatically, you need to install gettext.

On Debian based distros:

sudo apt install gettext

On macOS, you can install it using Homebrew:

brew install gettext