Metadata-Version: 2.1
Name: manim-recorder
Version: 0.2.1
Summary: Manim plugin for recorder
License: MIT
Keywords: voiceover,manim,recording,math animations
Author: AvN Learn
Author-email: avnlearn@gmail.com
Requires-Python: >=3.9,<3.13
Classifier: Development Status :: 3 - Alpha
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Topic :: Multimedia :: Graphics
Classifier: Topic :: Multimedia :: Sound/Audio :: Capture/Recording
Classifier: Topic :: Multimedia :: Sound/Audio :: Speech
Classifier: Topic :: Multimedia :: Video
Classifier: Topic :: Scientific/Engineering
Classifier: Topic :: Scientific/Engineering :: Visualization
Provides-Extra: all
Provides-Extra: termux
Requires-Dist: PyAudio (>=0.2.14,<0.3.0) ; extra == "all"
Requires-Dist: bottle (>=0.12.25,<0.13.0)
Requires-Dist: manim (>=0.18.1,<0.19.0)
Requires-Dist: mutagen (>=1.47.0,<2.0.0)
Requires-Dist: pydub (>=0.25.1,<0.26.0)
Requires-Dist: pynput (>=1.7.7,<2.0.0) ; extra == "all"
Requires-Dist: pyside6 (>=6.7.2,<7.0.0)
Requires-Dist: sox (>=1.5.0,<2.0.0)
Description-Content-Type: text/markdown

# Manim Recorder

## GUI (Using PySide6)

![GUI Recorder](https://github.com/avnlearn/manim-recorder/blob/main/assets/GUI%20recording.png?raw=true)

```python
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)

```python
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()
```

