Daniel Bigham
2009-06-24 17:43:01 UTC
I am attempting to save the retained audio of a recognition event to a WAV
file so that I can do "pitch detection" on that WAV file to try and figure
out whether the speaker is male or female.
Unfortunately, when I listen to the retained audio, it sounds like a
chipmunk... why is this? Has the retained audio been massaged / normalized?
Sample code:
SpMemoryStream memStream = result.Audio(0, -1);
SpFileStream fs = new SpFileStream();
fs.Open("C:\\test.wav", SpeechStreamFileMode.SSFMCreateForWrite, true);
object data;
while (true)
{
int numBytes = memStream.Read(out data, 128 * 1024);
if (numBytes == 0)
{
break;
}
fs.Write(data);
}
fs.Close();
file so that I can do "pitch detection" on that WAV file to try and figure
out whether the speaker is male or female.
Unfortunately, when I listen to the retained audio, it sounds like a
chipmunk... why is this? Has the retained audio been massaged / normalized?
Sample code:
SpMemoryStream memStream = result.Audio(0, -1);
SpFileStream fs = new SpFileStream();
fs.Open("C:\\test.wav", SpeechStreamFileMode.SSFMCreateForWrite, true);
object data;
while (true)
{
int numBytes = memStream.Read(out data, 128 * 1024);
if (numBytes == 0)
{
break;
}
fs.Write(data);
}
fs.Close();