SpeechBrain Lang Detect

September 1, 2026 ยท View on GitHub

An audio transformer plugin for OpenVoiceOS. It detects the spoken language of an audio signal using a SpeechBrain classifier, before speech-to-text runs.

Supported models

The plugin loads any of these SpeechBrain models from Hugging Face:

Install

pip install ovos-audio-transformer-plugin-speechbrain-langdetect

Usage

Add the plugin to the audio_transformers section of your listener config. Set model to any of the SpeechBrain models listed above.

"listener": {
    "audio_transformers": {
        "ovos-audio-transformer-plugin-speechbrain-langdetect": {
            "model": "speechbrain/lang-id-commonlanguage_ecapa"
        }
    }
}

Set use_cuda to true to run the classifier on a CUDA GPU instead of the CPU.

The plugin only classifies the language when more than one language is listed as valid. If a single language is configured, it skips classification and returns that language directly.

License

Apache-2.0