I'm modifying helloworld sample to do a simple speech recognition app. I'm using acoustic model from helloworld demo. But my ibook can only support 44100hz audio format. So I want to convert sample rate from 44100hz to 16000hz. Is it possible?
Or there is other alternative? Thanks.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
-
2005-11-24
Sox is a free utility for converting audio files from one format to another. It also can perform several signal processing functions, one of which is sample rate conversion. I think it's available for Linux and Windows, but not Mac OS (but you could run it under OS X's native Un*x). See http://sox.sourceforge.net/ .
But when you say, "my ibook can only support 44100hz audio format", I infer that you wish to convert 44.1 kHz live microphone audio rather than audio files to the 16 kHz rate.
1. There is a sample-rate conversion capability in Apple's sound manager library. We have used it in a speech reco product, but that was two jobs ago, and I cannot now supply any details. As I recall, it's not obvious how to do it, but it works.
2. Failing that, you have to implement it yourself, a digital signal processing operation involving upsampling, lowpass filtering, then downsampling. Up/downsampling by 4/11 yields 16167 Hz, which is probably close enough.
3. Even easier but much less exact is simply to discard 2 out of every 3 audio samples thus downsampling by 3 without any filtering. This will cause some "aliasing" distortion, and the resulting sample rate comes out to 14700 Hz, which is 8% low, but it might work well enough for your "simple speech recognition app". (Note that if your iBook could operate the audio input at 44 kHz, then downsampling by 3 comes out to 16 kHz exactly!)
Good luck!
cheers,
jerry
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
-
2005-11-24
Correction to #3 above: in "if your iBook could operate the audio input at 44 kHz", please change "44 kHz" to "48.0 kHz".
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I've tried to convert audiostream from live microphone using tritonus plugins. And it works. At least I don't notice any significant difference. :)
Thanks anyway.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
-
2005-11-29
Weiheng -- others would be interested if you could give more details about how you used the Tritonus plugins to convert the audio input stream from 44.1 to 16 kHz. Please tell us more. Thanks.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi all,
I'm modifying helloworld sample to do a simple speech recognition app. I'm using acoustic model from helloworld demo. But my ibook can only support 44100hz audio format. So I want to convert sample rate from 44100hz to 16000hz. Is it possible?
Or there is other alternative? Thanks.
Sox? -Arthur
Sox? mind to elaborate more? Thanks.
Sox is a free utility for converting audio files from one format to another. It also can perform several signal processing functions, one of which is sample rate conversion. I think it's available for Linux and Windows, but not Mac OS (but you could run it under OS X's native Un*x). See http://sox.sourceforge.net/ .
But when you say, "my ibook can only support 44100hz audio format", I infer that you wish to convert 44.1 kHz live microphone audio rather than audio files to the 16 kHz rate.
1. There is a sample-rate conversion capability in Apple's sound manager library. We have used it in a speech reco product, but that was two jobs ago, and I cannot now supply any details. As I recall, it's not obvious how to do it, but it works.
2. Failing that, you have to implement it yourself, a digital signal processing operation involving upsampling, lowpass filtering, then downsampling. Up/downsampling by 4/11 yields 16167 Hz, which is probably close enough.
3. Even easier but much less exact is simply to discard 2 out of every 3 audio samples thus downsampling by 3 without any filtering. This will cause some "aliasing" distortion, and the resulting sample rate comes out to 14700 Hz, which is 8% low, but it might work well enough for your "simple speech recognition app". (Note that if your iBook could operate the audio input at 44 kHz, then downsampling by 3 comes out to 16 kHz exactly!)
Good luck!
cheers,
jerry
Correction to #3 above: in "if your iBook could operate the audio input at 44 kHz", please change "44 kHz" to "48.0 kHz".
I've tried to convert audiostream from live microphone using tritonus plugins. And it works. At least I don't notice any significant difference. :)
Thanks anyway.
Weiheng -- others would be interested if you could give more details about how you used the Tritonus plugins to convert the audio input stream from 44.1 to 16 kHz. Please tell us more. Thanks.