Important: Please read the Qt Code of Conduct -

Can QAudioInput be used to stop receiving audio data from a Microphone if input audio is below certain level/threshold?

  • Hi All,

    I have a scenario where I intend to stop recording the audio from microphone when the input decibel levels are at minimum threshold. Can this scenario be effectively implemented using the current Qt 4.8.5 support?

  • well using suspend() and resume() instead of stop() and start() its gonna be much better in your case

  • @seiko - we can suspend() audio recording only if we know that we are going to resume() audio recording from microphone again. In my case I need to stop() the recording if there is silence for certain amount of time.

    Btw how can i create amplitude levels or decibel levels from microphone audio data. I believe we do not have any specific method in QAudioInput to facilitate that.


  • qt has already example contains amplitude levels take a look
    AudioInfo::writeData(const char *data, qint64 len)

  • @seiko - thanks a lot. I'll look into it.


Log in to reply