Librosa: output wav as float32?

Created on 27 Nov 2016  路  3Comments  路  Source: librosa/librosa

I have 16bit input 44.1kHz. I managed to understand the sr=None to get output as 44.1khz, but
somehow the output when writing a wav always gives me 32-bit float instead of 16-bit like original input. How do I fix this?

thanks

question

All 3 comments

nevermind, i fixed my problem by using module soundfile for reading and writing wav files.

:)

Have you tried to setting dtype=np.int16 when you use librosa.core.load? The dtype defaults to np.float32 (see doc) so I wonder you got float32-valued representation of audio.

@dankorg should I close this one out then?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ericdrobinson picture ericdrobinson  路  4Comments

GPrathap picture GPrathap  路  3Comments

edne picture edne  路  3Comments

lostanlen picture lostanlen  路  4Comments

dim5 picture dim5  路  3Comments