Skip to main content

Manim Speech

Manim plugin for adding speech to videos.

Special thanks to osolmaz and others who worked on Manim Voiceover, which Manim Speech is heavily based on.

Installation

Manim Speech can be installed via pip using the following command:

pip install "manim_speech[*optional_dependency_sets*]"

Where *optional_dependency_sets* is a list of optional dependency sets for Manim Speech.

Features

  • Adding AI-generated voiceovers to Manim animations.
  • Translating text between languages.

Services

Service Name Optional Dependency Set Is Local Text-To-Speech Speech-To-Text Translation
OpenAI openai No Yes Yes No
ElevenLabs elevenlabs No Yes No No
Whisper whisper Yes No Yes No
AssemblyAI assemblyai No No Yes No
DeepL deepl No No No Yes

Note: Translating to Traditional Chinese (zh_tw) using the DeepL service requires the chinese optional dependency set to be installed.

Usage Examples

Creating a basic scene with a voiceover with Manim Speech:

import manim
import manim_speech
from manim_speech.services import openai as openai_service

class MeaningOfLife(manim_speech.VoiceoverScene):
    def construct(self) -> None:
        self.set_tts_service(openai_service.OpenAITTSService())
        self.set_stt_service(openai_service.OpenAISTTService())

        with self.voiceover("What is the meaning of life?") as speech_data:
            txt = manim.Text("The meaning of life is 42.")
            self.play(manim.Write(txt), run_time=speech_data.duration)
            self.wait_for_voiceover()
            self.play(manim.FadeOut(txt))

The same scene, but translated into Traditional Chinese:

import manim
import manim_speech
from manim_speech.services import openai as openai_service
from manim_speech.services import deepl as deepl_service

class MeaningOfLife(manim_speech.VoiceoverScene, manim_speech.TranslationScene):
    def construct(self) -> None:
        self.set_tts_service(openai_service.OpenAITTSService())
        self.set_stt_service(openai_service.OpenAISTTService())
        self.set_translation_service(deepl_service.DeepLTranslationService())

        self.translate(__file__, "meaning_of_life", "en", "zh_tw")
        _ = self._

        with self.voiceover(_("What is the meaning of life?")) as speech_data:
            txt = manim.Text(_("The meaning of life is 42."))
            self.play(manim.Write(txt), run_time=speech_data.duration)
            self.wait_for_voiceover()
            self.play(manim.FadeOut(txt))

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

manim_speech-0.1.0.tar.gz (10.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

manim_speech-0.1.0-py3-none-any.whl (13.3 kB view details)

Uploaded Python 3

File details

Details for the file manim_speech-0.1.0.tar.gz.

File metadata

  • Download URL: manim_speech-0.1.0.tar.gz
  • Upload date:
  • Size: 10.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.0.0 CPython/3.12.3

File hashes

Hashes for manim_speech-0.1.0.tar.gz
Algorithm Hash digest
SHA256 15252159c4dada9710eb9195cbd87e87b082a4a30343f13e7cb2f766e2745ff5
MD5 315a2724af27252f68a2d6696a052468
BLAKE2b-256 1f21552af4ff6127b635c7eaebaaa5ef50185850ab631efa8177330769b6d8ac

See more details on using hashes here.

File details

Details for the file manim_speech-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: manim_speech-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 13.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.0.0 CPython/3.12.3

File hashes

Hashes for manim_speech-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5ed935b856c7c77c2851bc33dadd7ec09f334e672491ad29daf0d4532e4137cb
MD5 9d221f3c3fd3d41370fe50d371dc5065
BLAKE2b-256 f92a0a1e3e0168d8d34f2cdeba6c949a59744e96fbf1a9fcd669691dddd16287

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page