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

ValueError: frames must be specified for non-seekable files #76

Closed
yygg678 opened this issue Aug 6, 2019 · 2 comments
Closed

ValueError: frames must be specified for non-seekable files #76

yygg678 opened this issue Aug 6, 2019 · 2 comments

Comments

@yygg678
Copy link

yygg678 commented Aug 6, 2019

Preprocessing voxceleb2
VoxCeleb2: Preprocessing data for 5994 speakers.
VoxCeleb2: 0%| | 0/5994 [00:00<?, ?speakers/s]Traceback (most recent call last):
File "encoder_preprocess.py", line 61, in
preprocess_funcdataset
File "/NASdata/yangyg/Real-Time-Voice-Cloning/encoder/preprocess.py", line 175, in preprocess_voxceleb2
skip_existing, logger)
File "/NASdata/yangyg/Real-Time-Voice-Cloning/encoder/preprocess.py", line 116, in _preprocess_speaker_dirs
unit="speakers"))
File "/home/yyg/anaconda3/envs/RealTime/lib/python3.6/site-packages/tqdm/_tqdm.py", line 1017, in iter
for obj in iterable:
File "/home/yyg/anaconda3/envs/RealTime/lib/python3.6/site-packages/multiprocess/pool.py", line 735, in next
raise value
File "/home/yyg/anaconda3/envs/RealTime/lib/python3.6/site-packages/multiprocess/pool.py", line 119, in worker
result = (True, func(*args, **kwds))
File "/NASdata/yangyg/Real-Time-Voice-Cloning/encoder/preprocess.py", line 97, in preprocess_speaker
wav = audio.preprocess_wav(in_fpath)
File "/NASdata/yangyg/Real-Time-Voice-Cloning/encoder/audio.py", line 28, in preprocess_wav
wav, source_sr = librosa.load(fpath_or_wav, sr=None)
File "/home/yyg/anaconda3/envs/RealTime/lib/python3.6/site-packages/librosa/core/audio.py", line 138, in load
y = sf_desc.read(frames=frame_duration, dtype=dtype, always_2d=False).T
File "/home/yyg/anaconda3/envs/RealTime/lib/python3.6/site-packages/soundfile.py", line 860, in read
frames = self._check_frames(frames, fill_value)
File "/home/yyg/anaconda3/envs/RealTime/lib/python3.6/site-packages/soundfile.py", line 1268, in _check_frames
raise ValueError("frames must be specified for non-seekable files")
ValueError: frames must be specified for non-seekable files

now ,what can I do to solve it. thanks.

@sberryman
Copy link

@yyggithub I ran into that as well and I found two ways around it.

  1. You can change the thread pool size to 1 (from 8) https://github.com/CorentinJ/Real-Time-Voice-Cloning/blob/master/encoder/preprocess.py#L114 Honestly I'm not sure why this worked.
  2. You can convert every m4v file to wav. This was the route I went, just wrote a simple batch script and used ffmpeg (probably faster ways) to do the conversion.

@yygg678
Copy link
Author

yygg678 commented Sep 7, 2019

thank you for your answer,I have solve the problem.but I solve it in a different way,just only change librosa version to 0.5.0 (from 0.7.0) I think the mainly problem is thread pool size.

@ghost ghost closed this as completed Jul 5, 2020
@ghost ghost mentioned this issue Aug 4, 2020
This issue was closed.
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

2 participants