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?
Asked
Active
Viewed 782 times
1

user2530847
- 49
- 2
- 12
1 Answers
0
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.

ChrisN
- 16,635
- 9
- 57
- 81