Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I have a File Error in demo_part1.ipynb #202

Open
ME-YOU-SICK opened this issue Apr 28, 2024 · 5 comments
Open

I have a File Error in demo_part1.ipynb #202

ME-YOU-SICK opened this issue Apr 28, 2024 · 5 comments

Comments

@ME-YOU-SICK
Copy link

FileNotFoundError Traceback (most recent call last)
Cell In[18], line 2
1 reference_speaker = 'resources/example_reference.mp3' # This is the voice you want to clone
----> 2 target_se, audio_name = se_extractor.get_se(reference_speaker, tone_color_converter, target_dir='processed', vad=True)

File d:\Apps\AUDIOBOOK\OpenVoice\openvoice\se_extractor.py:144, in get_se(audio_path, vc_model, target_dir, vad)
137 # if os.path.isfile(se_path):
138 # se = torch.load(se_path).to(device)
139 # return se, audio_name
140 # if os.path.isdir(audio_path):
141 # wavs_folder = audio_path
143 if vad:
--> 144 wavs_folder = split_audio_vad(audio_path, target_dir=target_dir, audio_name=audio_name)
145 else:
146 wavs_folder = split_audio_whisper(audio_path, target_dir=target_dir, audio_name=audio_name)

File d:\Apps\AUDIOBOOK\OpenVoice\openvoice\se_extractor.py:79, in split_audio_vad(audio_path, audio_name, target_dir, split_seconds)
77 def split_audio_vad(audio_path, audio_name, target_dir, split_seconds=10.0):
78 SAMPLE_RATE = 16000
---> 79 audio_vad = get_audio_tensor(audio_path)
80 segments = get_vad_segments(
81 audio_vad,
82 output_sample=True,
(...)
...
1553 self._close_pipe_fds(p2cread, p2cwrite,
1554 c2pread, c2pwrite,
1555 errread, errwrite)

FileNotFoundError: [WinError 2] The system cannot find the file specified

@Mat1212fr
Copy link

Same error :

FileNotFoundError Traceback (most recent call last)
Cell In[15], line 2
1 reference_speaker = 'resources/example_reference.mp3' # This is the voice you want to clone
----> 2 target_se, audio_name = se_extractor.get_se(reference_speaker, tone_color_converter, target_dir='processed', vad=True)

File c:\Users\MAT1212\Documents\OpenVoiceAI\OpenVoice\openvoice\se_extractor.py:144, in get_se(audio_path, vc_model, target_dir, vad)
137 # if os.path.isfile(se_path):
138 # se = torch.load(se_path).to(device)
139 # return se, audio_name
140 # if os.path.isdir(audio_path):
141 # wavs_folder = audio_path
143 if vad:
--> 144 wavs_folder = split_audio_vad(audio_path, target_dir=target_dir, audio_name=audio_name)
145 else:
146 wavs_folder = split_audio_whisper(audio_path, target_dir=target_dir, audio_name=audio_name)

File c:\Users\MAT1212\Documents\OpenVoiceAI\OpenVoice\openvoice\se_extractor.py:79, in split_audio_vad(audio_path, audio_name, target_dir, split_seconds)
77 def split_audio_vad(audio_path, audio_name, target_dir, split_seconds=10.0):
78 SAMPLE_RATE = 16000
---> 79 audio_vad = get_audio_tensor(audio_path)
80 segments = get_vad_segments(
81 audio_vad,
82 output_sample=True,
(...)
...
1553 self._close_pipe_fds(p2cread, p2cwrite,
1554 c2pread, c2pwrite,
1555 errread, errwrite)

FileNotFoundError: [WinError 2] Le fichier spécifié est introuvable
Output is truncated. View as a scrollable element or open in a text editor. Adjust cell output settings...

@lixiaowei11111
Copy link

Your environment may lack ffmpeg, which whisper relies on

@AlexSteveChungAlvarez
Copy link

AlexSteveChungAlvarez commented Apr 30, 2024

FileNotFoundError Traceback (most recent call last) Cell In[18], line 2 1 reference_speaker = 'resources/example_reference.mp3' # This is the voice you want to clone
FileNotFoundError: [WinError 2] The system cannot find the file specified

Literally the comment tells you that you have to change the path to the audio path of the voice you want to clone, there's no issue here. I tried the code today and it works fine on colab.
Just replace the path.

@artursharykin
Copy link

The environment needs ffmpeg, if you're using conda: conda install ffmpeg.
But if you are using a pip-only environment, extract the contents of the bin folder from a pre-compiled version of ffmpeg such as ffmpeg-master-latest-win64-gpl-shared.zip @ https://github.com/BtbN/FFmpeg-Builds/releases into the following folder: .venv\Scripts.

@Mat1212fr
Copy link

Literally the comment tells you that you have to change the path to the audio path of the voice you want to clone, there's no issue here. I tried the code today and it works fine on colab. Just replace the path.

The path as nothing to do with it, I git clone the repo and it should work fine.

To clarify, I used Conda because I noticed in another GitHub Issue that this was the answer.

As for ffmpeg I already installed it but VS Code caused some problems because of the Windows PATH (the PATH does not update, etc...) but I digress (although if you know how to make the PATH of VS Code and the Windows PATH are updated at the same time I am interested, demo 2 does not work with me because of that).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants