简体   繁体   中英

RuntimeError: No audio I/O backend is available

Although I already 'pip install soundfile' ,I got the error :

      1 filename = "./data/SpeechCommands/speech_commands_v0.02/yes/00f0204f_nohash_0.wav"
----> 2 waveform, sample_rate = torchaudio.load(filepath=filename, num_frames=3)
      3 print(f'waveform tensor:{waveform}')
      4 waveform, sample_rate = torchaudio.load(filepath=filename, num_frames=3, offset =2)
      5 print(waveform)
~\anaconda3\lib\site-packages\torchaudio\backend\no_backend.py in load(filepath, out, normalization, channels_first, num_frames, offset, signalinfo, encodinginfo, filetype)
     18          encodinginfo: Optional[EncodingInfo] = None,
     19          filetype: Optional[str] = None) -> Tuple[Tensor, int]:
---> 20     raise RuntimeError('No audio I/O backend is available.')
     21 
     22* 

RuntimeError: No audio I/O backend is available

I think, the problem is with python versions.

Try one of them, please.

  • pip install PySoundFile
  • pip install SoundFile

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM