Failed to process mp3 file
Trying to run demo_part3. Simply replaced the mp3 with a different one containing some speech and the se_extractor just fails. Ideas as to why?
`NotImplementedError Traceback (most recent call last) Cell In[6], line 3 1 '' 2 reference_speaker = 'resources/20-1 [vocals].mp3' # This is the voice you want to clone ----> 3 target_se, audio_name = se_extractor.get_se(reference_speaker, tone_color_converter, vad=False)
File ~/repos/OpenVoice/openvoice/se_extractor.py:150, in get_se(audio_path, vc_model, target_dir, vad) 148 audio_segs = glob(f'{wavs_folder}/*.wav') 149 if len(audio_segs) == 0: --> 150 raise NotImplementedError('No audio segments found!') 152 return vc_model.extract_se(audio_segs, se_save_path=se_path), audio_name
NotImplementedError: No audio segments found!`
Hello, @lemuriandezapada! I'm here to help you with any issues you're facing. Let's work together to solve this problem!
The se_extractor fails with a NotImplementedError because no audio segments were found in the wavs_folder. This can happen if the mp3 file does not meet the specific requirements for segmentation. Ensure that the mp3 file:
- Contains clear speech.
- Has segments longer than 1.5 seconds and shorter than 20 seconds.
- Produces text segments between 2 and 200 characters when processed.
Additionally, try setting the vad parameter to True:
target_se, audio_name = se_extractor.get_se(reference_speaker, tone_color_converter, vad=True)
This might help in successfully processing the mp3 file [1][2].
To continue talking to Dosu, mention @dosu.
Step-by-Step Debugging and Fixing:
- Check if WAVs are Generated
2.Manually Convert MP3 to WAV
3.Fix Audio Segmentation
- Dependencies:
sudo apt install ffmpeg # Ubuntu/Linux
brew install ffmpeg # macOS
choco install ffmpeg # Windows
5.Final Steps: If you identify the bug, modify se_extractor.py and test with different MP3 files. Submit your fix as a pull request to the OpenVoice repo.