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

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

Check whether your installation works correctly:

manim -pql --disable_caching


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.

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