profile
viewpoint

Ask questionsValueError: frames must be specified for non-seekable files

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

CorentinJ/Real-Time-Voice-Cloning

Answer questions sberryman

@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.
useful!
source:https://uonfu.com/
Github User Rank List