FlorianEagox / WeeaBlind

A program to dub non-english media with modern AI speech synthesis, diarization, and voice cloning!
https://tessapainter.com/project/WeeaBlind
283 stars 26 forks source link

not able to dub #10

Closed tanuj1221 closed 9 months ago

tanuj1221 commented 1 year ago

Exception in thread Thread-17 (run_dubbing): Traceback (most recent call last): File "C:\Users\Tanuj\AppData\Local\Programs\Python\Python310\lib\threading.py", line 1009, in _bootstrap_inner self.run() File "C:\Users\Tanuj\AppData\Local\Programs\Python\Python310\lib\threading.py", line 946, in run self._target(*self._args, **self._kwargs) File "C:\freelancer\dub\weeablind\video.py", line 177, in run_dubbing progress_hook(i+1, "Mixing New Audio") UnboundLocalError: local variable 'i' referenced before assignment

FlorianEagox commented 1 year ago

Hello, thank you for testing the project! May I know the steps you took to get this error inside the application? May I know what video you're dubbing and can you confirm that it has embedded subtitles? If you go into the subtitles tab it should show them. If your video only has subs burned in, I'm working on adding support for that soon!

kosinus123 commented 9 months ago

same for me, just selecting a file would bring errors : Output file #0 does not contain any stream {'status': 'subless'} Traceback (most recent call last): File "D:\env\dub\lib\site-packages\wx\core.py", line 3427, in lambda event: event.callable(*event.args, *event.kw) ) File "D:\dub\tabs\ListStreams.py", line 49, in populate_streams self.rb_subs = wx.RadioBox(self, wx._core.wxAssertionError: C++ assertion ""majorDim != 0"" failed at ....\src\common\radiocmn.cpp(110) in wxRadioBoxBase::SetMajorDim(): major radiobox dimension can't be 0 Exception in thread Thread-9 (run_dubbing): Traceback (most recent call last): File "C:\Users\xxx\AppData\Local\Programs\Python\Python310\lib\threading.py", line 1016, in _bootstrap_inner self.run() File "C:\Users\xxx\AppData\Local\Programs\Python\Python310\lib\threading.py", line 953, in run self._target(self._args, **self._kwargs) File "D:\dub\video.py", line 172, in run_dubbing progress_hook(i+1, "Mixing New Audio") UnboundLocalError: local variable 'i' referenced before assignment

FlorianEagox commented 9 months ago

Hi, I would ask you the same question I asked earlier in the thread. How'd you get this error, what steps did you take, and does the video you're using contain a subtitle stream? If not, you're able to experiment with video OCR.

kosinus123 commented 9 months ago

hi, for example, trying to load that video, I get the error I pasted https://www.youtube.com/watch?v=Lwt7zI9XQoo

FlorianEagox commented 9 months ago

Aha, thank you so much for your reply. That video doesn't have built-in subtitles, but the program can still technically handle this!

If you uncomment line #47 in video.py, and change "all" in line 49 to the language code of your desired language, e.g. r"en" for english. it will try to download the auto-translated version of those subtitles from youtube. This doesn't always work though There'sw also some other issue I just discovered with this that I will try to fix tonight. thanks for your feedback and I'll respond soon!

FlorianEagox commented 9 months ago

Okay, if you get the latest version, the auto-generated subtitles should be downloaded from YT. You can then go to the List Streams tab and choose which language to use!