Search code examples
audiokeyboardwebrtcaudio-processing

webrtc audio_processing: what is keyboard channel in StreamConfig?


At webrtc/modules/audio_processing/include/audio_processing.h class StreamConfig there is an option has_keyboard, my question is what it is? and How to use it?


Solution

  • That's the keyboard microphone channel and by default it will be used if the user's keyboard has a microphone.

    If you look at helpers.cc:

    webrtc::StreamConfig CreateStreamConfig(const AudioParameters& parameters) {
      int channels = parameters.channels();
      (...)
      const bool has_keyboard = parameters.channel_layout() ==
                                media::CHANNEL_LAYOUT_STEREO_AND_KEYBOARD_MIC;