Pregunta

I have a project about speech recognition. Although I used library "sndfile.h", I am stuck in reading input sound. I have a question: the data which was read by function sf_readf_float() is time-domain signal, isn't it? If not, then what is it? Is there any formula to transform it to time-domain signal?

¿Fue útil?

Solución

Yes, the data that libsndfile returns is time-domain data: the audio samples from the input file. The function sf_readf_float returns the samples in "frames", one frame being a set of samples from each channel at a given point in time. Also, sf_readf_float scales the samples to be in the range [-1.0, 1.0] - see this note for details.

Have a look at sndfile-tools for example code that reads sound files using libsndfile. The sndfile-mix-to-mono example should be a good starting point.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top