[SciPy-user] SciPy 0.4.4: fromstring

José María josemaria.alkala at gmail.com
Thu Jan 19 12:50:08 CST 2006


Hello,
I have changed to SciPy 0.4.4 but now, the next code for reading audiofiles:
-------------------------------------------------
def ReadRawSound (_filename):
        _fSound = open( _filename , 'r' )
        _SoundAsChar = _fSound.read()
        _fSound.close()
        _SoundAsFloat = scipy.fromstring( _SoundAsChar , dtype='f' , count=-1)

        return _SoundAsFloat
--------------------------------------------------

With the previous version I used:
_SoundAsFloat =scipy.fromstring( _SoundAsChar , typecode='f' , count=-1)

The problem is that now this function seems VERY slow.

===============================
I'm using Gentoo and I'm really new to python and scipy. There still no exist 
and ebuild so I installed by doing:
python setup.py build
python setup.py install


Is this a problem with 'fromstring' or with my installation?

Thanks a lot in advance? 
José María (Spain)




More information about the SciPy-user mailing list