Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QAudioFormat do not support sample rate 16000
Forum Updated to NodeBB v4.3 + New Features

QAudioFormat do not support sample rate 16000

Scheduled Pinned Locked Moved Solved General and Desktop
2 Posts 2 Posters 514 Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • thamT Offline
    thamT Offline
    tham
    wrote on last edited by tham
    #1

    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.

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      What about using something like libsamplerate ? This will allow you to resample your audio data before feeding them to pocketSphinx.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      2

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved