QAudioFormat do not support sample rate 16000
tham last edited by tham
Qt version : 5.13.0
OS : ubuntu 16.04
I want to read the sound from microphone with following format
QAudioFormat format; format.setSampleRate(16000); format.setChannelCount(1); format.setSampleSize(16); format.setCodec("audio/pcm"); format.setByteOrder(QAudioFormat::LittleEndian); format.setSampleType(QAudioFormat::UnSignedInt);
This format is needed for pocketSphinx to perform sound recognition, problem is my devices only support sample rate "(8000, 11025, 22050, 44100, 48000)". My backend is the default one. Device name is "alsa_input.pci-0000_00_1f.3.analog-stereo"
How could I find out what are the issues? Need to update driver? Buy a sound card or a new microphone?Thanks
ps : I don't know the model of my microphone, it is a cheap product and I lost the document already.
What about using something like libsamplerate ? This will allow you to resample your audio data before feeding them to pocketSphinx.