ManimCommunity / manim-voiceover

Manim plugin for all things voiceover
https://voiceover.manim.community/en/stable
MIT License
186 stars 25 forks source link

_StitcherService saves files with wrong file name #88

Open mushunrek opened 6 months ago

mushunrek commented 6 months ago

Description of bug / unexpected behavior

When using the _StitcherService, an error occurs, because the hashed audiofile is searched for in the directory media/voiceovers/media/voiceovers instead of media/voiceovers.

How to reproduce the issue

Since the error lies in the search of an audiofile, the most basic example reproduces the error.

Code for reproducing the problem ```py class Example(VoiceoverScene): def construct(self): self.set_speech_service(_StitcherService("my_voice_recording.mp3")) with self.voiceover("Test"): pass ```

Additional media files

Images/GIFs ![ErrorStitcher](https://github.com/ManimCommunity/manim-voiceover/assets/84899386/ad06af91-f731-45d0-bb2c-cbd08459ceda)

System specifications

irrelevant

Additional comments

The error can be fixed as follows: replace line 150 in stitcher.py by

            output_dict["segments"].append({"index": i, "path": data_hash + ".mp3"})