---
name: mkurman/speechbrain
source: https://app.decimal.ai/s/mkurman-speechbrain@1/SKILL.md
source_sha256: a9f1f9654870
---

## Overview

SpeechBrain is an open-source PyTorch speech processing toolkit covering ASR (speech-to-text), speaker recognition, speech separation, diarization, enhancement, language identification, emotion recognition, and text-to-speech. Provides pretrained models and recipe-based training.

## Installation

```bash
uv pip install speechbrain
```

## Speech Recognition

```python
from speechbrain.inference.ASR import EncoderDecoderASR

asr_model = EncoderDecoderASR.from_hparams(
    source="speechbrain/asr-crdnn-rnnlm-librispeech",
    savedir="pretrained_models/asr")
transcript = asr_model.transcribe_file("audio.wav")
print(f"Transcript: {transcript}")
```

## Speaker Verification

```python
from speechbrain.inference.speaker import SpeakerRecognition

verification = SpeakerRecognition.from_hparams(
    source="speechbrain/spkrec-ecapa-voxceleb",
    savedir="pretrained_models/spkrec")
score, prediction = verification.verify_files("speaker1.wav", "speaker2.wav")
print(f"Same speaker: {prediction} (score: {score:.3f})")
```

## References
- [SpeechBrain docs](https://speechbrain.github.io/)
- [SpeechBrain GitHub](https://github.com/speechbrain/speechbrain)