Socket
Book a DemoInstallSign in
Socket

manim-recorder

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

manim-recorder

Manim plugin for recorder

0.6.0
pipPyPI
Maintainers
1

Manim Recorder

Installation

Blank Audio

pip install "manim-recorder[blank]"

Audio Recording

pip install "manim-recorder[gui_recorder]"

GTTs

pip install "manim-recorder[gTTS]"

All

pip install manim-recorder

GUI (Using PySide6)

GUI Recorder 1

GUI Recorder 1

GUI Recorder 1

from manim import *
# from manim_recorder import VoiceoverScene
from manim_recorder.voiceover_scene import SoundScene
# from manim_recorder.services.recorder import RecorderService
from manim_recorder.recorder.gui import RecorderService


class VoiceRecorder(SoundScene):
    def construct(self):
        self.set_audio_service(
            RecorderService()
        )

        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="Thank you for watching.") as tracker:
            self.play(Uncreate(circle))

        self.wait()

CLI (Pynput)

from manim import *
# from manim_recorder import VoiceoverScene
from manim_recorder.voiceover_scene import SoundScene
# from manim_recorder.services.recorder import RecorderService
from manim_recorder.recorder.pynput import RecorderService
from pathlib import Path


class VoiceRecorder(SoundScene):
    def construct(self):
        self.set_audio_service(
            RecorderService(
                device_index=0,
                # cache_dir=Path(
                #     config.media_dir + "/voiceovers/" + self.__class__.__name__.lower()
                # ),
            )
        )

        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="Thank you for watching.") as tracker:
            self.play(Uncreate(circle))

        self.wait()

Termux Cli

from manim import *
from manim_recorder.voiceover_scene import SoundScene
from manim_recorder.recorder.termux import RecorderService
from pathlib import Path


class Recordering(SoundScene):
    def construct(self):
        self.set_speech_service(
            RecorderService(
            )
        )

        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("This circle is drawn as I speak.") as tracker:
        #     self.safe_wait(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="Thank you for watching."):
            self.play(Uncreate(circle))

        self.wait()

Blank Voice

import pprint, json
from manim import *
import pathlib
from manim_recorder.voiceover_scene import SoundScene
from manim_recorder.service.blank import BlankService


class Example_Without_Wait(SoundScene):
    def construct(self):
        self.set_audio_service(BlankService())
        config.disable_caching = True
        circle = Circle()
        square = Square().shift(2 * RIGHT)
        self.play_voiceover(circle, subcaption="Create Circle")
        self.wait_voiceover("move to circle")
        self.play(circle.animate.shift(2 * RIGHT))
        self.play_voiceover(
            circle.animate.shift(2 * LEFT),
            subcaption="two unit",
        )
        self.play_voiceover(Uncreate(circle), subcaption="Thank you!")

Keywords

voiceover

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.