[Scipy-tickets] [SciPy] #1405: scipy.io.wavfile should be able to read 24 bit signed wave

SciPy Trac scipy-tickets@scipy....
Thu Mar 10 11:19:58 CST 2011


#1405: scipy.io.wavfile should be able to read 24 bit signed wave
-------------------------+--------------------------------------------------
 Reporter:  tuxicoman    |       Owner:  somebody
     Type:  enhancement  |      Status:  new     
 Priority:  normal       |   Milestone:          
Component:  Other        |     Version:  0.7.2   
 Keywords:               |  
-------------------------+--------------------------------------------------
 So far the scipy.io.wavfile module cannot read 24 bit wave files whereas
 it's quite a popular format.

 After looking to source code, it seems that because there i no numpy.int24
 type; the code fails on 24bit wave file. The function crashes on following
 line :

 {{{
 data = numpy.fromfile(fid, dtype=dtype, count=size//bytes)
 }}}


 with dtype = "<i3" :-(

 Because 24bit is stored on 3 bytes, scipy.io.wavfile needs additional code
 to slice and convert filebytes into an 32bit type array for example.
 Unfortunately, even after googling, I'm not enough talented in
 python/numpy/wavfile to code this. So i file this ticket for someone else
 to code it. Thanks.

-- 
Ticket URL: <http://projects.scipy.org/scipy/ticket/1405>
SciPy <http://www.scipy.org>
SciPy is open-source software for mathematics, science, and engineering.


More information about the Scipy-tickets mailing list