Tôi đang cố gắng đọc tệp .wav bằng scipy. Tôi làm điều này:scipy.io.wavfile cung cấp lỗi "WavFileWarning: chunk not understand"
from scipy.io import wavfile
filename = "myWavFile.wav"
print "Processing " + filename
samples = wavfile.read(filename)
Và tôi nhận được lỗi xấu xí này:
/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/scipy/io/wavfile.py:121: WavFileWarning: chunk not understood
warnings.warn("chunk not understood", WavFileWarning)
Traceback (most recent call last):
File "fingerFooler.py", line 15, in <module>
samples = wavfile.read(filename)
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/scipy/io/wavfile.py", line 127, in read
size = struct.unpack(fmt, data)[0]
struct.error: unpack requires a string argument of length 4
Tôi đang sử dụng Python 2.6.6, 1.6.2 NumPy, và scipy 0.11.0
Here's một tệp wav gây ra sự cố.
Mọi suy nghĩ? Có gì sai ở đây?
thử 'samples = wavfile.read (mở (tên tệp 'r'))' – Skyler
Đã thử, vẫn gặp lỗi tương tự ... – Eric
bạn có chắc tệp .wav của mình là chuẩn không? là nó không nén hay không? – Skyler