# Speechbrain

> SpeechBrain — PyTorch speech toolkit. ASR, speaker recognition, speech separation, diarization, enhancement, language identification, and TTS. Recipe-based training with pre-trained model zoo.

- Skill: `mkurman/speechbrain` (Agent Skill)
- Install (CLI): `npx skillmds@latest add mkurman/speechbrain`
- Raw SKILL.md: https://api.skillmd.com/api/skills/mkurman/speechbrain/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: AI & ML
- Author: mkurman (https://skillmd.com/u/mkurman)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/mkurman/speechbrain

---

## 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)
