1

これは可能ですか?? scikits.audiolab から wavread を使用すると、次のエラーが発生するようです。

x86_64.egg/scikits/audiolab/pysndfile/matapi.pyc in basic_reader(filename, last, first)
     93             if not hdl.format.file_format == filetype:
     94                 raise ValueError, "%s is not a %s file (is %s)" \
---> 95                       % (filename, filetype, hdl.format.file_format)
     96 
     97             fs = hdl.samplerate

ValueError: si762.wav is not a wav file (is nist)

NIST wav ファイルを読み取れないと推測していますが、numpy 配列に簡単に読み取る別の方法はありますか? そうでない場合、データを読み取るための最良の方法は何ですか?

おそらく nist ヘッダーを認識するように audiolab wavread を書き換えますか??

4

3 に答える 3

4

私自身の質問に答えてください. 次に、次を使用します。

from scikits.audiolab import Sndfile, play
f = Sndfile(filename, 'r')
data = f.read_frames(10000)
play(data) # Just to test the read data
于 2012-04-17T07:58:33.437 に答える