1

This line of code is throwing an error:

import wave
...
wave.open('/path/to/wavfile/1a.wav', "rb")

The 1a.wav is in the NIST SPHERE format. I don't have much experience with the wav formats, but is there anyway I could transform it into RIFF format so that I can open it with the "wave" library?

Thank you in advance!

UrmLmn
  • 1,099
  • 2
  • 16
  • 28
  • 1
    According to https://stackoverflow.com/a/37602426/120261, SoX should be able to convert SPHERE to WAV. – mtrw Apr 29 '18 at 19:37

1 Answers1

2

Use ffmpeg to convert. e.g.

ffmpeg -i test.wav -acodec pcm_s16le -ac 1 -ar 16000 out.wav
Honghe.Wu
  • 5,899
  • 6
  • 36
  • 47