Manim plugin for recorder
Project description
Manim Recorder
GUI (Using PySide6)
from manim import *
# from manim_recorder import VoiceoverScene
from manim_recorder.voiceover_scene import RecorderScene
# from manim_recorder.services.recorder import RecorderService
from manim_recorder.recorder.gui import RecorderService
class VoiceRecorder(RecorderScene):
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 RecorderScene
# from manim_recorder.services.recorder import RecorderService
from manim_recorder.recorder.pynput import RecorderService
from pathlib import Path
class VoiceRecorder(RecorderScene):
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()
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
manim_recorder-0.2.0.tar.gz
(18.6 kB
view hashes)
Built Distribution
Close
Hashes for manim_recorder-0.2.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ca6e45346209c2c822a80e78c7942037a2b65086287baa84ad205325b4768600 |
|
MD5 | fcfaf9ad67fc6ed0cc467bc50abd4f4c |
|
BLAKE2b-256 | 8fcffea0001f7b6e5fe6682da575e1404a0eeac178ab453d48bb9e5dfbfe90ee |