-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
1,075 additions
and
269 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
{ | ||
"cells": [ | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 16, | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"from manim import *\n" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 17, | ||
"metadata": {}, | ||
"outputs": [ | ||
{ | ||
"data": { | ||
"text/html": [ | ||
"<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\">Manim Community <span style=\"color: #008000; text-decoration-color: #008000\">v0.18.1</span>\n", | ||
"\n", | ||
"</pre>\n" | ||
], | ||
"text/plain": [ | ||
"Manim Community \u001b[32mv0.\u001b[0m\u001b[32m18.1\u001b[0m\n", | ||
"\n" | ||
] | ||
}, | ||
"metadata": {}, | ||
"output_type": "display_data" | ||
}, | ||
{ | ||
"name": "stdout", | ||
"output_type": "stream", | ||
"text": [ | ||
"Yes\n" | ||
] | ||
}, | ||
{ | ||
"data": { | ||
"image/png": "iVBORw0KGgoAAAANSUhEUgAABQAAAALQCAYAAADPfd1WAAAUgklEQVR4nO3YQQ0AIBDAsAP/nkEFIVlaBXtvzcwZAAAAACBp/w4AAAAAAN4xAAEAAAAgzAAEAAAAgDADEAAAAADCDEAAAAAACDMAAQAAACDMAAQAAACAMAMQAAAAAMIMQAAAAAAIMwABAAAAIMwABAAAAIAwAxAAAAAAwgxAAAAAAAgzAAEAAAAgzAAEAAAAgDADEAAAAADCDEAAAAAACDMAAQAAACDMAAQAAACAMAMQAAAAAMIMQAAAA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zAAEAAAAgzAAEAAAAgDADEAAAAADCDEAAAAAACDMAAQAAACDMAAQAAACAMAMQAAAAAMIMQAAAAAAIMwABAAAAIMwABAAAAIAwAxAAAAAAwgxAAAAAAAgzAAEAAAAgzAAEAAAAgDADEAAAAADCDEAAAAAACDMAAQAAACDMAAQAAACAMAMQAAAAAMIMQAAAAAAIMwABAAAAIMwABAAAAICwC0cpBp8Rbaq9AAAAAElFTkSuQmCC", | ||
"text/plain": [ | ||
"<IPython.core.display.Image object>" | ||
] | ||
}, | ||
"metadata": {}, | ||
"output_type": "display_data" | ||
} | ||
], | ||
"source": [ | ||
"%%manim -qm -v WARNING VoiceRecorder\n", | ||
"class VoiceRecorder(Scene):\n", | ||
" def construct(self):\n", | ||
" t = Text(\"Hello\")\n", | ||
" p = Paragraph(\"Go\")\n", | ||
" m = MarkupText(\"Yes\")\n", | ||
" print(m.original_text)\n" | ||
] | ||
} | ||
], | ||
"metadata": { | ||
"kernelspec": { | ||
"display_name": ".venv", | ||
"language": "python", | ||
"name": "python3" | ||
}, | ||
"language_info": { | ||
"codemirror_mode": { | ||
"name": "ipython", | ||
"version": 3 | ||
}, | ||
"file_extension": ".py", | ||
"mimetype": "text/x-python", | ||
"name": "python", | ||
"nbconvert_exporter": "python", | ||
"pygments_lexer": "ipython3", | ||
"version": "3.12.5" | ||
} | ||
}, | ||
"nbformat": 4, | ||
"nbformat_minor": 2 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,32 @@ | ||
from pprint import pp | ||
from manim import * | ||
|
||
from manim_recorder.voiceover_scene import RecorderScene | ||
from manim_recorder.recorder.gui import RecorderService | ||
from pathlib import Path | ||
|
||
|
||
class VoiceRecorder(RecorderScene): | ||
def construct(self): | ||
# self.set_audio_service(RecorderService(), cache_dir_delete=True, skip=True) | ||
self.set_audio_service(RecorderService(), cache_dir_delete=True) | ||
# self.set_audio_service(RecorderService()) | ||
|
||
circle = Circle() | ||
square = Square().shift(2 * RIGHT) | ||
math = MathTex(r"x = \dfrac{-b \pm \sqrt{b^2 - 4ac}}{2a}") | ||
m = VGroup(circle, square, math) | ||
# self.say_to_image_play(Create(circle)) | ||
# self.say_to_image_play(Uncreate(circle)) | ||
# self.say_to_image_play(Write(math)) | ||
# self.say_to_image_play(Unwrite(math)) | ||
self.say_to_image_play(Write(m)) | ||
# print(Write(m).get_all_mobjects()) | ||
# self.say_to_play_image(Create(circle)) | ||
# self.say_to_image_play(Create(circle)) | ||
|
||
with self.voiceover( | ||
"भारत के दस सबसे अधिक प्रतिभाशाली लेखक यह हमलोग नहीं जानना सकते है कि भुत्तकल(Past) में बहुत सारे लिखका हुए जो प्रतिभाशाली थे और आने वाले भाभिष्य कल (Future) में प्रतिभाशाली लेखक होगे। यह हम कुछ लेखको को देखेगे।, इसलिए लिखेगे", math | ||
) as tracker: | ||
self.play(Write(math), run_time=tracker.duration) | ||
|
||
# self.play(Unwrite(math)) | ||
|
||
# with self.voiceover(math) as tracker: | ||
# self.play(Write(math), run_time=tracker.duration) | ||
|
||
# self.play(Unwrite(math)) | ||
|
||
# self.say_to_wait("This circle is drawn as I speak.", None, Create(circle)) | ||
|
||
self.say_to_play(Create(circle), text="This circle is drawn as I speak.", mobject=math) | ||
# with self.voiceover(text="This circle is drawn as I speak.") as tracker: | ||
# self.play(Create(circle), run_time=tracker.duration) | ||
|
||
self.say_to_wait() | ||
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) | ||
self.wait() | ||
|
||
with self.voiceover(text="Thank you for watching.") as tracker: | ||
self.play(Uncreate(circle)) | ||
|
||
self.wait() | ||
if __name__ == "__main__": | ||
scene = VoiceRecorder() | ||
scene.render() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.