Manim plugin for recorder
Project description
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)
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!")
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.6.0.tar.gz
(21.8 MB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file manim_recorder-0.6.0.tar.gz.
File metadata
- Download URL: manim_recorder-0.6.0.tar.gz
- Upload date:
- Size: 21.8 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.21
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
29d124e57620f6b82cc999356956010a08a0032e459288a1a33bff18c9a51607
|
|
| MD5 |
c04414b97f000c64537d4f92fc3af0b7
|
|
| BLAKE2b-256 |
f60ff663985aa6a944e955a75961021905e5ee2ada473075d42f4ec7ac0b5b12
|
File details
Details for the file manim_recorder-0.6.0-py3-none-any.whl.
File metadata
- Download URL: manim_recorder-0.6.0-py3-none-any.whl
- Upload date:
- Size: 21.8 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.21
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6a7762b6910678db9b69a22b9e41a684a9a27012ae64ffd817bf26fc823f4dc2
|
|
| MD5 |
84cb53bf07ee54d4af13a1574217f8d8
|
|
| BLAKE2b-256 |
569bc9a64fbd140bd36eb51829d608f9c6056bc9de438de7fa4fb9dcc60ae5dc
|