dc_tts icon indicating copy to clipboard operation
dc_tts copied to clipboard

FileNotFoundError: [Errno 2] No such file or directory - Wavs folder not found

Open dbarroso1 opened this issue 6 years ago • 6 comments

I'm trying to Run Prepo.py but I get this error. I do in fact have the .wav files in this directory and I have changed the Hyperparams to point into the correct folders. Am I getting something wrong here? should I add some argument to the python prepo.py

Traceback (most recent call last):
  File "prepo.py", line 20, in <module>
    fname, mel, mag = load_spectrograms(fpath)
  File "C:\Users\dbarroso\Development Projects\Morti-OS Suite\Morti-OS-Suite\TTS\utils.py", line 152, in load_spectrograms
    mel, mag = get_spectrograms(fpath)
  File "C:\Users\dbarroso\Development Projects\Morti-OS Suite\Morti-OS-Suite\TTS\utils.py", line 32, in get_spectrograms
    y, sr = librosa.load(fpath, sr=hp.sr)
  File "C:\anaconda3\envs\morti_os\lib\site-packages\librosa\core\audio.py", line 112, in load
    with audioread.audio_open(os.path.realpath(path)) as input_file:
  File "C:\anaconda3\envs\morti_os\lib\site-packages\audioread\__init__.py", line 80, in audio_open
    return rawread.RawAudioFile(path)
  File "C:\anaconda3\envs\morti_os\lib\site-packages\audioread\rawread.py", line 61, in __init__
    self._fh = open(filename, 'rb')
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\<USERNAME>\\TTS\\data\\private\\voice\\wheatly\\wavs\\\ufeffSM001-0001.wav'

NOTE: in this section of the error:

FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\<USERNAME>\\TTS\\data\\private\\voice\\wheatly\\wavs\\\ufeffSM001-0001.wav'

ufeff should not be there, it should just be SM001-001.wav, at some point its adding this to the path

dbarroso1 avatar Jun 14 '18 20:06 dbarroso1

ufeff is added to the string because of an encoding issue. I had the same problem. To get over it, I opened my metadata.csv (or transcript.csv, whatever you named it) in Sublime and then went "File"-> "Save with encoding"->"UTF-8" and it started working.

saya1984 avatar Sep 10 '18 19:09 saya1984

Its also giving me these error IOError: [Errno 2] No such file or directory: '/data/private/voice/LJSpeech-1.0/transcript.csv' and I have ensured the csv is in that directory and I have saved it in UTF-8

Waguitar avatar Jan 22 '20 22:01 Waguitar

Where is 'transcript.csv' file? please share it or address it? I can not find it

mohsenhrt avatar Apr 12 '20 22:04 mohsenhrt

I'm running the eda.py and got these errors. I have the wavfiles directory and the CSV files in the Audio classification master folder. The expected length of the audio files in displayed but only for a few files and the remaining files displays "nan". Please help me resolve this issue. Thanks in advance!

runfile('C:/Users/Misha Chandar/Desktop/Audio-Classification-master/eda.py', wdir='C:/Users/Misha Chandar/Desktop/Audio-Classification-master') Traceback (most recent call last):

File "", line 1, in runfile('C:/Users/Misha Chandar/Desktop/Audio-Classification-master/eda.py', wdir='C:/Users/Misha Chandar/Desktop/Audio-Classification-master')

File "C:\Users\Misha Chandar\Anaconda3\lib\site-packages\spyder_kernels\customize\spydercustomize.py", line 827, in runfile execfile(filename, namespace)

File "C:\Users\Misha Chandar\Anaconda3\lib\site-packages\spyder_kernels\customize\spydercustomize.py", line 110, in execfile exec(compile(f.read(), filename, 'exec'), namespace)

File "C:/Users/Misha Chandar/Desktop/Audio-Classification-master/eda.py", line 69, in rate, signal = wavfile.read('wavfiles/'+f)

File "C:\Users\Misha Chandar\Anaconda3\lib\site-packages\scipy\io\wavfile.py", line 264, in read fid = open(filename, 'rb')

FileNotFoundError: [Errno 2] No such file or directory: 'wavfiles/72002000A.wav'

Mishachandar avatar Apr 24 '20 13:04 Mishachandar

@Mishachandar did you find the solution to this problem? I am working on the same project and the same error occurs now. If you know anything about how to solve it then please let me know. It's urgent.

ashsharma96 avatar Jul 22 '20 15:07 ashsharma96

@hacker1111 ever find the issue?

michealcarac avatar Dec 10 '20 01:12 michealcarac