Skip to main content

Manim Onvoice Termux for Manim

Project description

Manim Onvoice

Manim plugin for adding speech to videos.

Special thanks to manim-voiceover, which Manim Onvoice is heavily based on.

manim-voiceover feature is only supported recorder

Requirement

pkg install manim

Usage

from manim import *
from manim_onvoice.voiceover_scene import VoiceoverScene
from manim_onvoice.services.recorder import RecorderService


class HelloWorld(VoiceoverScene):
    def construct(self):
        self.set_speech_service(RecorderService(silence_threshold=-40.0))

        circle = Circle()
        square = Square().shift(2 * RIGHT)

        with self.voiceover(text="This circle is drawn as I speak.") as tracker:
            self.play(Create(circle), run_time=tracker.duration)

        with self.voiceover(text="Let's shift it to the left 2 units.") as tracker:
            self.play(circle.animate.shift(2 * LEFT), run_time=tracker.duration)

        with self.voiceover(text="Now, let's transform it into a square.") as tracker:
            self.play(Transform(circle, square), run_time=tracker.duration)

        with self.voiceover(text="Thank you for watching."):
            self.play(Uncreate(circle))

        self.wait()

Project details


Download files

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

Source Distribution

manim_onvoice-1.0.0.tar.gz (12.6 kB view hashes)

Uploaded Source

Built Distribution

manim_onvoice-1.0.0-py2.py3-none-any.whl (14.7 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page