OpenVoice icon indicating copy to clipboard operation
OpenVoice copied to clipboard

I have a File Error in demo_part1.ipynb

Open ME-YOU-SICK opened this issue 9 months ago • 5 comments

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

ME-YOU-SICK avatar Apr 28 '24 15:04 ME-YOU-SICK

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...

Mat1212fr avatar Apr 28 '24 15:04 Mat1212fr

Your environment may lack ffmpeg, which whisper relies on

lixiaowei11111 avatar Apr 29 '24 13:04 lixiaowei11111

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.

AlexSteveChungAlvarez avatar Apr 30 '24 02:04 AlexSteveChungAlvarez

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.

artursharykin avatar Apr 30 '24 08:04 artursharykin

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).

Mat1212fr avatar Apr 30 '24 17:04 Mat1212fr