JarodMica / StyleTTS-WebUI

MIT License
52 stars 18 forks source link

Error when transcribing. #11

Closed 96webbjo closed 3 months ago

96webbjo commented 3 months ago

When I load in the data set and click transcribe, it comes up with an error. (I'm using the frozen installer package). This is the code (it is alien language to me, so I have no idea what's going on here).

No language specified, language will be first be detected for each audio file (increases inference time). Lightning automatically upgraded your loaded checkpoint from v1.5.4 to v2.4.0. To apply the upgrade to your files permanently, run python -m pytorch_lightning.utilities.upgrade_checkpoint C:\Users\Shadow\.cache\torch\whisperx-vad-segmentation.bin Model was trained with pyannote.audio 0.0.1, yours is 3.1.1. Bad things might happen unless you revert pyannote.audio to 0.x. Model was trained with torch 1.10.0+cu102, yours is 2.3.1+cu121. Bad things might happen unless you revert torch to 1.x. Loaded Whisper model Traceback (most recent call last): File "C:\Users\Shadow\Downloads\StyleTTS-WebUI\runtime\Lib\site-packages\gradio\queueing.py", line 536, in process_events response = await route_utils.call_process_api( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Shadow\Downloads\StyleTTS-WebUI\runtime\Lib\site-packages\gradio\route_utils.py", line 288, in call_process_api output = await app.get_blocks().process_api( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Shadow\Downloads\StyleTTS-WebUI\runtime\Lib\site-packages\gradio\blocks.py", line 1931, in process_api result = await self.call_function( ^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Shadow\Downloads\StyleTTS-WebUI\runtime\Lib\site-packages\gradio\blocks.py", line 1516, in call_function prediction = await anyio.to_thread.run_sync( # type: ignore ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Shadow\Downloads\StyleTTS-WebUI\runtime\Lib\site-packages\anyio\to_thread.py", line 56, in run_sync return await get_async_backend().run_sync_in_worker_thread( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Shadow\Downloads\StyleTTS-WebUI\runtime\Lib\site-packages\anyio_backends_asyncio.py", line 2177, in run_sync_in_worker_thread return await future ^^^^^^^^^^^^ File "C:\Users\Shadow\Downloads\StyleTTS-WebUI\runtime\Lib\site-packages\anyio_backends_asyncio.py", line 859, in run result = context.run(func, args) ^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Shadow\Downloads\StyleTTS-WebUI\runtime\Lib\site-packages\gradio\utils.py", line 826, in wrapper response = f(args, *kwargs) ^^^^^^^^^^^^^^^^^^ File "C:\Users\Shadow\Downloads\StyleTTS-WebUI\runtime\Lib\site-packages\gradio\utils.py", line 826, in wrapper response = f(args, **kwargs) ^^^^^^^^^^^^^^^^^^ File "C:\Users\Shadow\Downloads\StyleTTS-WebUI\webui.py", line 351, in transcribe_other_language_proxy file_durations = [get_duration(os.path.join(chosen_directory, item)) for item in items if os.path.isfile(os.path.join(chosen_directory, item))] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Shadow\Downloads\StyleTTS-WebUI\webui.py", line 351, in file_durations = [get_duration(os.path.join(chosen_directory, item)) for item in items if os.path.isfile(os.path.join(chosen_directory, item))] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Shadow\Downloads\StyleTTS-WebUI\modules\tortoise_dataset_tools\audio_conversion_tools\split_long_file.py", line 12, in get_duration duration_output = subprocess.check_output(['ffprobe', '-v', 'error', '-show_entries', 'format=duration', '-of', 'default=noprint_wrappers=1:nokey=1', file_path]) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "subprocess.py", line 466, in check_output File "subprocess.py", line 548, in run File "subprocess.py", line 1026, in init File "subprocess.py", line 1538, in _execute_child FileNotFoundError: [WinError 2] The system cannot find the file specified

JarodMica commented 3 months ago

Hey there,

My bad! I've completely forgotten about ffmpeg reliance. I'll have to repackage it up but won't be able to do that until tonight.

For now, the quick fix would be to download it yourself and place it into the StyleTTS2 webui folder. You can find the .7z file here where you'll download the full version.

https://www.gyan.dev/ffmpeg/builds/ffmpeg-git-full.7z

You can unzip with windows, but if not, you'll need to download 7zip or another 7zip extractor.

After extracting it, inside of the bin folder, you'll see ffprobe.exe and ffmpeg.exe.

Copy and paste those into the StyleTTS2 webui folder and you should be good to run

96webbjo commented 3 months ago

Much respect!

JarodMica commented 3 months ago

It should be re-uploaded and good to go. The link in the membership tab has been updated with the latest release incase you wanted to go with that (downloading ffmpeg is quick though)

Siddiq199 commented 3 months ago

Hello, I have cut and pasted both ffprobe.exe and ffmpeg.exe into as follows : modules > StyleTTS2 Yet I still get this error for some reason. Thanks for your time! Screenshot 2024-08-20 201008

To create a public link, set share=True in launch(). No language specified, language will be first be detected for each audio file (increases inference time). Lightning automatically upgraded your loaded checkpoint from v1.5.4 to v2.4.0. To apply the upgrade to your files permanently, run python -m pytorch_lightning.utilities.upgrade_checkpoint C:\Users\lenovo\.cache\torch\whisperx-vad-segmentation.bin Model was trained with pyannote.audio 0.0.1, yours is 3.1.1. Bad things might happen unless you revert pyannote.audio to 0.x. Model was trained with torch 1.10.0+cu102, yours is 2.3.1+cu121. Bad things might happen unless you revert torch to 1.x. Loaded Whisper model Traceback (most recent call last): File "C:\Users\lenovo\Desktop\StyleTTS\StyleTTS-WebUI\venv\Lib\site-packages\gradio\queueing.py", line 536, in process_events response = await route_utils.call_process_api( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\lenovo\Desktop\StyleTTS\StyleTTS-WebUI\venv\Lib\site-packages\gradio\route_utils.py", line 288, in call_process_api output = await app.get_blocks().process_api( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\lenovo\Desktop\StyleTTS\StyleTTS-WebUI\venv\Lib\site-packages\gradio\blocks.py", line 1931, in process_api result = await self.call_function( ^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\lenovo\Desktop\StyleTTS\StyleTTS-WebUI\venv\Lib\site-packages\gradio\blocks.py", line 1516, in call_function prediction = await anyio.to_thread.run_sync( # type: ignore ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\lenovo\Desktop\StyleTTS\StyleTTS-WebUI\venv\Lib\site-packages\anyio\to_thread.py", line 56, in run_sync return await get_async_backend().run_sync_in_worker_thread( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\lenovo\Desktop\StyleTTS\StyleTTS-WebUI\venv\Lib\site-packages\anyio_backends_asyncio.py", line 2177, in run_sync_in_worker_thread return await future ^^^^^^^^^^^^ File "C:\Users\lenovo\Desktop\StyleTTS\StyleTTS-WebUI\venv\Lib\site-packages\anyio_backends_asyncio.py", line 859, in run result = context.run(func, args) ^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\lenovo\Desktop\StyleTTS\StyleTTS-WebUI\venv\Lib\site-packages\gradio\utils.py", line 826, in wrapper response = f(args, *kwargs) ^^^^^^^^^^^^^^^^^^ File "C:\Users\lenovo\Desktop\StyleTTS\StyleTTS-WebUI\venv\Lib\site-packages\gradio\utils.py", line 826, in wrapper response = f(args, kwargs) ^^^^^^^^^^^^^^^^^^ File "C:\Users\lenovo\Desktop\StyleTTS\StyleTTS-WebUI\webui.py", line 351, in transcribe_other_language_proxy file_durations = [get_duration(os.path.join(chosen_directory, item)) for item in items if os.path.isfile(os.path.join(chosen_directory, item))] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\lenovo\Desktop\StyleTTS\StyleTTS-WebUI\webui.py", line 351, in file_durations = [get_duration(os.path.join(chosen_directory, item)) for item in items if os.path.isfile(os.path.join(chosen_directory, item))] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\lenovo\Desktop\StyleTTS\StyleTTS-WebUI\modules\tortoise_dataset_tools\audio_conversion_tools\split_long_file.py", line 12, in get_duration duration_output = subprocess.check_output(['ffprobe', '-v', 'error', '-show_entries', 'format=duration', '-of', 'default=noprint_wrappers=1:nokey=1', file_path]) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\lenovo\AppData\Local\Programs\Python\Python311\Lib\subprocess.py", line 466, in check_output return run(popenargs, stdout=PIPE, timeout=timeout, check=True, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\lenovo\AppData\Local\Programs\Python\Python311\Lib\subprocess.py", line 548, in run with Popen(popenargs, kwargs) as process: ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\lenovo\AppData\Local\Programs\Python\Python311\Lib\subprocess.py", line 1026, in init self._execute_child(args, executable, preexec_fn, close_fds, File "C:\Users\lenovo\AppData\Local\Programs\Python\Python311\Lib\subprocess.py", line 1538, in _execute_child hp, ht, pid, tid = _winapi.CreateProcess(executable, args, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ FileNotFoundError: [WinError 2] The system cannot find the file specified

JarodMica commented 3 months ago

Hey @Siddiq199, it looks like you've put them into the wrong folder. Try putting them into StyleTTS-Webui and it should resolve your issue