Streamlit application for transcription and translation using IBM Granite Speech on Apple Silicon with MLX.
1
stars
174
commits
Python
primary language
Aug 11, 2026
updated
Streamlit application for transcription and translation using IBM Granite Speech on Apple Silicon with MLX.
Transcription + French translation of a sample clip, in dark mode.
Three models run as a pipeline, loaded on first run and cached thereafter:
| Model | Role | Runs on |
|---|---|---|
| Granite Speech 4.1 2B (8-bit, MLX) | Transcription and translation | Apple GPU (MLX) |
| Silero VAD v6 | Splits audio into speech segments | Apple GPU (MLX) |
| Granite Guardian HAP 125m | English toxicity detection | CPU |
Audio is loaded and resampled to 16 kHz mono, optionally segmented with VAD, then transcribed and translated segment-by-segment on the GPU. VAD runs on the GPU too, batching its encoder across chunks so a whole clip costs a couple of model calls rather than one per 32 ms; it falls back to the PyTorch build of the same checkpoint, on CPU, if the MLX weights are unavailable. Each segment is encoded once and reused across every selected task, so N tasks cost one audio encode rather than N. Any output that may be English is scored for toxicity.
curl -LsSf https://astral.sh/uv/install.sh | sh)brew install ffmpeg (required: torchcodec loads FFmpeg's shared libraries at import time, so the app won't start without it)brew install ffmpeg # required at runtime by torchcodec
uv sync
uv run streamlit run streamlit_app.py
First run downloads the Granite Speech model (~3.3 GB) plus the VAD and guardian models, then caches them; inference runs on the Apple Silicon GPU.
New here? Try it with the bundled sample clip:
tests/data/audio/sample_10s.wav.
uv run ruff check . # lint
uv run ruff format . # format
uv run ty check # type-check
uv run pytest # run tests
Licensed under the Apache License 2.0. See NOTICE for third-party attributions.
174 commits
Python
97.9%
Shell
2.1%
Streamlit application for transcription and translation using IBM Granite Speech on Apple Silicon with MLX.
1
stars
174
commits
Python
primary language
Aug 11, 2026
updated
Streamlit application for transcription and translation using IBM Granite Speech on Apple Silicon with MLX.
Transcription + French translation of a sample clip, in dark mode.
Three models run as a pipeline, loaded on first run and cached thereafter:
| Model | Role | Runs on |
|---|---|---|
| Granite Speech 4.1 2B (8-bit, MLX) | Transcription and translation | Apple GPU (MLX) |
| Silero VAD v6 | Splits audio into speech segments | Apple GPU (MLX) |
| Granite Guardian HAP 125m | English toxicity detection | CPU |
Audio is loaded and resampled to 16 kHz mono, optionally segmented with VAD, then transcribed and translated segment-by-segment on the GPU. VAD runs on the GPU too, batching its encoder across chunks so a whole clip costs a couple of model calls rather than one per 32 ms; it falls back to the PyTorch build of the same checkpoint, on CPU, if the MLX weights are unavailable. Each segment is encoded once and reused across every selected task, so N tasks cost one audio encode rather than N. Any output that may be English is scored for toxicity.
curl -LsSf https://astral.sh/uv/install.sh | sh)brew install ffmpeg (required: torchcodec loads FFmpeg's shared libraries at import time, so the app won't start without it)brew install ffmpeg # required at runtime by torchcodec
uv sync
uv run streamlit run streamlit_app.py
First run downloads the Granite Speech model (~3.3 GB) plus the VAD and guardian models, then caches them; inference runs on the Apple Silicon GPU.
New here? Try it with the bundled sample clip:
tests/data/audio/sample_10s.wav.
uv run ruff check . # lint
uv run ruff format . # format
uv run ty check # type-check
uv run pytest # run tests
Licensed under the Apache License 2.0. See NOTICE for third-party attributions.
174 commits
Python
97.9%
Shell
2.1%