python使用soundfile库读入语音时抛错ValueError: frames must be specified for non-seekable files

  File "/media/chutz/000206BE0003636E/KerasDeepSpeech/generator.py", line 152, in next_batch
    ret = self.get_batch(self.cur_index)
  File "/media/chutz/000206BE0003636E/KerasDeepSpeech/generator.py", line 69, in get_batch
    x_val = [get_max_specto_time(file_name) for file_name in batch_x]
  File "/media/chutz/000206BE0003636E/KerasDeepSpeech/generator.py", line 69, in 
    x_val = [get_max_specto_time(file_name) for file_name in batch_x]
  File "/media/chutz/000206BE0003636E/KerasDeepSpeech/generator.py", line 226, in get_max_specto_time
    r = spectrogram_from_file(filename)
  File "/media/chutz/000206BE0003636E/KerasDeepSpeech/generator.py", line 367, in spectrogram_from_file
    audio = sound_file.read(dtype='float32')
  File "/home/chutz/anaconda3/lib/python3.5/site-packages/soundfile.py", line 960, in read
    frames = self._check

你可能感兴趣的:(原创,python,soundfile,keras)