Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save danielrosehill/e8afe33e10667c2f8d66510c8350c3bc to your computer and use it in GitHub Desktop.
Save danielrosehill/e8afe33e10667c2f8d66510c8350c3bc to your computer and use it in GitHub Desktop.
Improving voice input quality on Ubuntu for STT / dictation

Voice Recognition Enhancement on Linux (Ubuntu)

This guide explains how to improve voice recognition and speech-to-text accuracy on Linux (specifically Ubuntu) by enhancing your microphone input using EasyEffects and PipeWire.

Rationale

Voice recognition accuracy heavily depends on the quality of the microphone and the clarity of the audio signal. While investing in a high-quality microphone is a great start, software processing can further enhance signal quality. By routing microphone input through EasyEffects, you can apply advanced audio processing such as noise reduction, automatic gain control (AGC), and voice detection, resulting in a cleaner, more consistent signal for speech recognition tools.

Prerequisites

  • A Linux distribution with PipeWire (e.g., Ubuntu 22.04 or newer)
  • A functional microphone
  • Basic terminal knowledge

Step 1: Set Up EasyEffects with PipeWire

  1. Install EasyEffects:

    sudo apt update
    sudo apt install easyeffects
  2. Ensure PipeWire is your audio backend: Most modern Ubuntu distributions use PipeWire by default. To confirm:

    pactl info | grep 'Server Name'

    You should see something like PipeWire (server name).

  3. Configure EasyEffects as the default input device:

    • Open EasyEffects.

    • In the Input tab, make sure EasyEffects is selected as the default.

    • Use pavucontrol (PulseAudio Volume Control) to route your microphone through EasyEffects:

      sudo apt install pavucontrol
      pavucontrol
    • Under the Input Devices and Recording tabs, set your microphone to route through EasyEffects.

Step 2: Apply Voice Processing Effects

  1. Load the Speech Processing Preset:

    • In EasyEffects, go to the Input Effects tab.

    • Add the following effects in this order:

      • Noise Reduction (e.g., speexdsp plugin)
      • Voice Activity Detection
      • Automatic Gain Control (AGC)
      • Denoise
  2. Set EasyEffects to Always Run:

    • In EasyEffects settings, enable "Start with system".
    • This ensures your mic input is always processed before reaching any application.
  3. Verify the Processing Chain:

    • Speak into your microphone.
    • Check EasyEffects’ input meter to confirm it is receiving and processing audio.

Notes

  • EasyEffects acts as a middleman: it picks up the raw microphone input, processes it, and outputs a cleaned-up signal as the default mic source.
  • You can layer additional effects (e.g., compressor, de-esser) depending on your needs.
  • To change your microphone or input source, you must adjust the default input in PulseAudio (pavucontrol).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment