Metadata-Version: 2.1
Name: manim_onvoice
Version: 1.0.0
Summary: Manim Onvoice Termux for Manim
Keywords: recorder,manim,termux
Author-email: AvN Learn <avnlearn@gmail.com>
Description-Content-Type: text/markdown
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Requires-Dist: manim
Requires-Dist: python-slugify
Requires-Dist: sox
Requires-Dist: mutagen
Requires-Dist: pydub
Project-URL: Home, https://github.com/avnlearn/manim-onvoice-termux.git

# Manim Onvoice

Manim plugin for adding speech to videos.

Special thanks to [manim-voiceover](https://github.com/ManimCommunity/manim-voiceover), which Manim Onvoice is heavily based on.

manim-voiceover feature is only supported recorder

- [Manim Onvoice](#manim-onvoice)
  - [Requirement](#requirement)
  - [Usage](#usage)

## Requirement

* [manim](https://docs.manim.community/en/stable/installation.html)

```sh
pkg install manim
```

* [python-slugify](https://github.com/un33k/python-slugify)
* [sox](https://github.com/marl/pysox)
* [mutagen](https://github.com/quodlibet/mutagen)
* [pydub](https://github.com/jiaaro/pydub)

## Usage

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



