cohere-transcribe-rs

Library Listed

Rust implementation for the CohereLabs/cohere-transcribe-03-2026 speech-to-text model. Includes a CLI and an OpenAI-compatible API server.

Checked · Sources

Downloads
0
Dependents
0
Stars
101
Forks
15
Contributors
1
Commits
34
Latest release
0.1.1 ·

About

From the project README ·

Cohere Transcribe in Rust

Rust implementation for the CohereLabs/cohere-transcribe-03-2026 model. Includes a self-contained CLI and an OpenAI-compatible API server for AI agents.

Supports English, French, German, Spanish, Italian, Portuguese, Dutch, Polish, Greek, Arabic, Japanese, Chinese, Vietnamese, and Korean.


Quick Start (pre-built binaries)

No build tools needed — just download and run.

1. Download the release for your platform

Go to Releases and download the zip for your platform:

PlatformAsset
Linux x86_64 (CPU)transcribe-linux-x86_64.zip
Linux x86_64 (CUDA 12.6)transcribe-linux-x86_64-cuda.zip
Linux aarch64 (CPU, SVE)transcribe-linux-aarch64.zip
Linux aarch64 (CUDA 12.6)transcribe-linux-aarch64-cuda.zip
macOS Apple Silicontranscribe-macos-aarch64.zip
# Example for Linux x86_64:
unzip transcribe-linux-x86_64.zip
cd transcribe-linux-x86_64
2. Download model weights

The model is gated — you must log in to HuggingFace and accept the license terms first: https://huggingface.co/CohereLabs/cohere-transcribe-03-2026

Then download the weights into a models/ directory inside the release folder:

Read the full README
pip install huggingface_hub
huggingface-cli login            # paste your HF_TOKEN when prompted
huggingface-cli download CohereLabs/cohere-transcribe-03-2026 \
  --local-dir models/cohere-transcribe-03-2026
3. Copy vocab.json into the model directory

The release includes a pre-generated vocab.json. Copy it to the model folder:

cp vocab.json models/cohere-transcribe-03-2026/
4. Test the CLI
./transcribe --model-dir models/cohere-transcribe-03-2026 --language en recording.wav

No LD_LIBRARY_PATH or DYLD_LIBRARY_PATH needed — the binary has RPATH baked in and finds libtorch/ (Linux) or mlx.metallib (macOS) in the same directory.

5. Test the API server
# Start the server
./transcribe-server --model-dir models/cohere-transcribe-03-2026 --port 8080 &

# Wait for "Listening on ..." message, then:
curl -X POST http://localhost:8080/v1/audio/transcriptions \
  -F "file=@recording.wav" \
  -F "model=cohere-transcribe" \
  -F "language=en"

The server is OpenAI Whisper API compatible — works with any OpenAI client library.


CLI Reference

USAGE:
    transcribe --model-dir <PATH> [OPTIONS] <AUDIO>...

ARGUMENTS:
    <AUDIO>...          One or more audio files to transcribe

OPTIONS:
    -m, --model-dir     Path to the model directory
    -l, --language      Language code [default: en]
        --no-punctuation  Strip punctuation from output
        --max-tokens    Max tokens to generate per segment [default: 448]
    -v, --verbose       Enable info logging (-vv for debug)
    -h, --help          Print help
Language codes
CodeLanguageCodeLanguageCodeLanguage
enEnglishdeGermannlDutch
frFrenchesSpanishplPolish
arArabicitItalianelGreek
jaJapaneseptPortugueseviVietnamese
zhChinesekoKorean
Audio formats

WAV, FLAC, MP3, AAC, OGG — anything supported by symphonia. Audio is automatically converted to 16 kHz mono.

Files longer than ~35 seconds are split into overlapping chunks (5 s overlap) and the results joined automatically.

Examples
# Transcribe a single file
./transcribe -m models/cohere-transcribe-03-2026 interview.mp3

# French, no punctuation
./transcribe -m models/cohere-transcribe-03-2026 --language fr --no-punctuation speech.wav

# Multiple files — prints filename before each transcript
./transcribe -m models/cohere-transcribe-03-2026 call1.wav call2.wav call3.flac

# Show model loading progress
./transcribe -m models/cohere-transcribe-03-2026 -v audio.wav

API Server

transcribe-server is an OpenAI-compatible HTTP server built on Axum. It serves the same model as the CLI and is a drop-in replacement for the OpenAI Whisper API.

Start the server
./transcribe-server \
  --model-dir models/cohere-transcribe-03-2026 \
  --host 0.0.0.0 \
  --port 8080

The server loads the model at startup (~30–90 s depending on hardware), then prints:

Listening on http://0.0.0.0:8080
Endpoint: POST http://0.0.0.0:8080/v1/audio/transcriptions
Endpoints
MethodPathDescription
POST/v1/audio/transcriptionsTranscribe audio — OpenAI compatible
GET/healthLiveness probe → {"status":"ok"}
Transcription request
curl -X POST http://localhost:8080/v1/audio/transcriptions \
  -F "file=@recording.wav" \
  -F "model=cohere-transcribe" \
  -F "language=en" \
  -F "response_format=json"

Form fields (all OpenAI-compatible):

FieldRequiredDefaultNotes
fileyes—Audio bytes (WAV, MP3, FLAC, AAC, OGG)
modelyes—Any string; the server ignores it
languagenoenISO-639-1 code
response_formatnojsonjson, text, verbose_json, srt, vtt
temperatureno—Ignored; always greedy
promptno—Ignored

Response formats:

# json (default)
{"text": "Hello, world."}

# text
Hello, world.

# verbose_json
{"task":"transcribe","language":"en","duration":3.0,"text":"Hello, world.","segments":[...]}

# srt
1
00:00:00,000 --> 00:00:03,000
Hello, world.

# vtt
WEBVTT

00:00:00.000 --> 00:00:03.000
Hello, world.
Using with OpenAI client libraries
from openai import OpenAI

client = OpenAI(
    base_url="http://localhost:8080/v1",
    api_key="not-used",  # required by the client, ignored by the server
)

with open("recording.wav", "rb") as f:
    transcript = client.audio.transcriptions.create(
        model="cohere-transcribe",
        file=f,
        language="en",
    )
print(transcript.text)
import OpenAI from "openai";
import fs from "fs";

const openai = new OpenAI({
  baseURL: "http://localhost:8080/v1",
  apiKey: "not-used",
});

const transcript = await openai.audio.transcriptions.create({
  model: "cohere-transcribe",
  file: fs.createReadStream("recording.wav"),
  language: "en",
});
console.log(transcript.text);
Server options
OPTIONS:
  -m, --model-dir     Model directory (required)
      --host          Bind address [default: 0.0.0.0]
  -p, --port          Port [default: 8080]
  -l, --language      Default language when not specified by client [default: en]
      --max-tokens    Max tokens per segment [default: 448]
  -v, --verbose       Logging (-v info, -vv debug)
  -h, --help          Print help

Build from Source

Backends

Two compute backends are available — select one at compile time:

BackendPlatformFeature flagAccelerator
libtorch (default)Linux x86_64, Linux aarch64--features tch-backendCPU (BLAS-optimized)
MLXmacOS Apple Silicon--features mlxApple GPU (Metal)

Both backends produce identical output from the same weights.

Requirements

All platforms:

  • Rust stable (1.70+) — install from rustup.rs
  • 8 GB RAM — the model weights expand to ~5.6 GB at runtime
  • Python + sentencepiece — one-time only, to extract vocab.json

Linux (libtorch backend):

  • libtorch C++ library — downloaded once, ~500 MB

macOS Apple Silicon (MLX backend):

  • macOS 14+ with an M-series chip
  • mlx-c is built automatically from the git submodule by build.rs
Step 1 — Install libtorch (Linux only)

Pick the build for your platform and extract it to /opt/libtorch. This is the C++ library from PyTorch.org; no Python runtime is involved.

Linux x86_64:

curl -Lo libtorch.zip \
  'https://download.pytorch.org/libtorch/cpu/libtorch-cxx11-abi-shared-with-deps-2.7.0%2Bcpu.zip'
sudo unzip libtorch.zip -d /opt

Linux ARM64 (AWS Graviton3, Ampere Altra — requires SVE support):

curl -Lo libtorch.tar.gz \
  'https://github.com/second-state/libtorch-releases/releases/download/v2.7.1/libtorch-cxx11-abi-aarch64-2.7.1.tar.gz'
sudo tar xzf libtorch.tar.gz -C /opt

Both commands produce /opt/libtorch/. Set LIBTORCH=/your/path to use a different location.

Docker on macOS: Extract libtorch to a native Linux path such as /opt/libtorch, not onto the macOS volume mount (e.g. /Users/…). The Linux linker cannot read large shared libraries through the virtiofs layer.

Step 2 — Download model weights
pip install huggingface_hub
huggingface-cli download CohereLabs/cohere-transcribe-03-2026 \
  --local-dir models/cohere-transcribe-03-2026
Step 3 — Extract the vocabulary (one time only)

The model uses a SentencePiece tokenizer. Run this script once to produce vocab.json, which the Rust binary reads at runtime. Python is not needed after this step.

pip install sentencepiece
python tools/extract_vocab.py --model_dir models/cohere-transcribe-03-2026
Step 4 — Build

Linux (libtorch backend, default):

LIBTORCH=/opt/libtorch cargo build --release

The LIBTORCH path is baked into the binary's RPATH by build.rs, so the binary runs without LD_LIBRARY_PATH.

macOS Apple Silicon (MLX backend):

git submodule update --init --recursive
cargo build --release --no-default-features --features mlx

Docker on macOS (Linux builds): If the project source is on a macOS volume mount, set CARGO_TARGET_DIR to a native Linux path to prevent SIGBUS during compilation:

LIBTORCH=/opt/libtorch CARGO_TARGET_DIR=/tmp/cohere_target cargo build --release -j 1
Step 5 — Run
./target/release/transcribe --model-dir models/cohere-transcribe-03-2026 recording.wav

No environment variables needed — RPATH is baked in at build time.


Troubleshooting

libtorch not found (Linux) Set LIBTORCH=/path/to/libtorch before building, or install to /opt/libtorch.

Missing required file 'vocab.json' Run python tools/extract_vocab.py --model_dir <model_dir>, or copy vocab.json from the release zip into the model directory.

Process killed immediately (exit 137) Out of memory. The model needs ~5.6 GB of RAM. Check with free -h (Linux) or Activity Monitor (macOS).

Illegal instruction (exit 132) on ARM Linux The ARM64 libtorch build requires SVE (Scalable Vector Extension), available on Graviton3, Ampere Altra, and similar server-class CPUs. It does not run on Apple Silicon Linux VMs, which only expose NEON. Use a native Linux ARM64 server with SVE, or use the macOS MLX backend on Apple hardware.

ELF section name out of range at link time (Linux) libtorch is on a Docker volume-mounted macOS path. Move it to a native Linux path such as /opt/libtorch.


Performance

Benchmarked on an M4 Mac Mini (MLX/Metal GPU backend). Model loading takes a few seconds on first run, but once loaded, inference is 10x–24x faster than real-time. NVIDIA GPU builds (CUDA libtorch) will be significantly faster still.

CLI
AudioDurationWall timeNotes
Demo WAV (real speech)5.44 s12.9 sIncludes 3.3 s model load + Metal compile
Synthetic 60 s tone60 s18.1 sTests chunking (chunks split at ~35 s)
API Server

The server loads the model once at startup. Subsequent requests skip model loading and Metal shader compilation, making warm requests extremely fast.

RequestAudioResponse timeNotes
1st request (cold Metal)5.44 s8.3 sIncludes Metal shader compilation
2nd+ requests (warm)5.44 s0.4 s13x faster than audio duration
60 s chunked (warm)60 s2.5 s24x faster than audio duration
Runs on
CUDA
What shows it
  • CUDA: cohere-transcribe-rs feature tch-backend (dependency tch)
Native code
Optional
  • Binds native code: torch-sys (feature tch-backend)
  • Build uses a native toolchain: cmake
Python bindings
No Python binding crate found
License
Apache-2.0

Compare with similar projects

Order: strongest tier first, then most downloads, then name, with unmeasured values last. A library counts downloads over 30 days. An app counts binary downloads per release. An app with none counts its crate downloads over 30 days. ML Rust runs this catalogue, so its closest project always gets a row.

cohere-transcribe-rs beside the projects that share a topic with it
ProjectDownloadsDependentsStarsLatest releaseRuns on (GPU)Native codeLicense
cohere-transcribe-rs This page Listed

Rust implementation for the CohereLabs/cohere-transcribe-03-2026 speech-to-text model. Includes a CLI and an OpenAI-compatible API server.

0 downloads over 30 days 0 101 0.1.1 CUDA Binds native code: torch-sys (feature tch-backend). Build uses a native toolchain: cmake Apache-2.0

Japanese text preprocessor for Text-to-Speech application (OpenJTalk rewrite in rust language).

14,491 downloads over 30 days 7 61 0.15.0 GPU support unknown No native code found BSD-3-Clause
silero Listed

Production-oriented Rust wrapper for the Silero VAD ONNX model.

1,888 downloads over 30 days 3 6 0.7.0 CUDA, ROCm Binds native code: ort-sys (feature coreml) Apache-2.0 OR MIT
aspeak App Listed Dormant

A simple text-to-speech client for Azure TTS API.

Python bindings

488 binary downloads per release Not applicable 496 6.1.0 GPU support unknown No native code found MIT
qwen3_tts_rs App Listed

A Rust implementation of the Qwen3 Text-to-Speech (TTS) model inference.

204 binary downloads per release Not applicable 237 Not measured Not measured None stated

Rust bindings for transcribe.cpp, a C/C++ speech-to-text library built on ggml

50,251 downloads over 30 days 3 2,149 0.4.1 CUDA, Metal, ROCm, Vulkan Binds native code: transcribe, transcribe-cpp-sys, transcribe_cpp. Build uses a native toolchain: cmake MIT
voxr New

Audio and speech on boostr: compressed-audio decode, resampling, DSP and grapheme to phoneme, with speech synthesis (Kokoro, VITS), voice cloning (VoxCPM2), transcription with word timings (Whisper), voice activity (Silero) and audio-text scoring (CLAP), on CPU or CUDA.

642 downloads over 30 days 2 2 0.9.1 CUDA No native code found Apache-2.0
Why ListedNo archive, New or Featured rule places it, so it is Listed.

What it lacks for Featured

  • It has 0 active dependents and 0 new dependents in 365 days. Featured needs 11 active dependents or 9 new dependents in 365 days. The repository route reads 101 stars, 15 forks and 1 contributor. It needs 4,539 stars, 434 forks and 79 contributors together.

What else the check found

  • The last activity is on 19 May 2026, 174 days ago. The rules expect an update within 365 days. Dormancy rule

Exact rules: Listed, Featured library. The check on applied thresholds version 9.

Every rule outcome, as the check records it
  • expected-interval: version 0.1.1 base 300, capped at 1 releases = 50, raised to the 365-day floor: E = 365 days
  • dormancy: last activity 2026-05-19, 174 days ago, E = 365: active
  • featured: not featured: active_users 0 < 11 and new_adopters 0 < 9 and repository route stars 101 (needs 4539), forks 15 (needs 434), contributors 1 (needs 79)
  • listed: listed: no archive, new or featured rule applies

Measurements and sources

Each signal row shows the raw value, its source and the fetch date. The Sources list gathers every distinct source on this page. Movement needs more history.

Sources6 sources
Adoption0 active dependents, 0 new dependents in 365 days1 not measured
Adoption measurements
SignalValueSourceFetchedCounts
Active dependents0crates.io database dumpYes
New dependents (365 days)0crates.io database dumpYes
Peak active dependents0crates.io database dumpYes
Active dependents as a share of the peak1crates.io database dumpYes
Binary downloads per releaseNot measuredYes
MaintenanceLatest human commit: 5 months ago3 not measured
Maintenance measurements
SignalValueSourceFetchedCounts
Latest human commit2026-05-19GitHub repositoryYes
Latest release2026-03-29crates.io database dumpYes
First release2026-03-29crates.io database dumpYes
Latest version0.1.1crates.io database dumpYes
Days the oldest outside issue waits for a reply225GitHub repositoryYes
Maintainer replies over 365 days0GitHub repositoryYes
Repository archivedfalseGitHub repositoryYes
Repository gonefalseGitHub repositoryYes
Release commit or manifest in the repotruecrates.io packageYes
Published docstruecrates.io database dumpYes
Latest release fails cargo checkNot measuredYes
Build check dateNot measuredYes
Build check toolchainNot measuredYes
SecurityUnpatched vulnerabilities: none
Security measurements
SignalValueSourceFetchedCounts
Unpatched vulnerabilities past the grace windownoneRustSec advisory databaseYes
RustSec unmaintained advisorynoneRustSec advisory databaseYes
Deprecation noticenonecrates.io database dumpYes
Deprecated requirementnonecrates.io database dumpYes
Distribution1 releases, 0 downloads over 30 days5 not measured
Distribution measurements
SignalValueSourceFetchedCounts
Releases1crates.io database dumpYes
Downloads over 30 days0crates.io database dumpYes
Binary downloads over the last 3 releasesNot measuredYes
Homebrew installs on request over 365 daysNot measuredYes
Repology repository familiesNot measuredYes
Docker pull growth over 90 daysNot measuredYes
Docker pulls at the growth baselineNot measuredYes
Every version a prereleasefalsecrates.io database dumpYes
Every version 0.0.xfalsecrates.io database dumpYes
Every version yankedfalsecrates.io database dumpYes
Crate deleted from crates.iofalsecrates.io database dumpYes
Repository101 stars, 15 forks, 1 contributors, 34 commits. Stars alone never qualify a project.
Repository measurements
SignalValueSourceFetchedCounts
GitHub stars101GitHub repositoryYes — one part of the repository route
GitHub forks15GitHub repositoryYes — one part of the repository route
Contributors with a GitHub account1GitHub contributorsYes — one part of the repository route
Commits on the default branch34GitHub repositoryNo
Repository's main crate left out of the entrynonecrates.io database dumpYes
Facts that never count
Facts that never count measurements
SignalValueSourceFetchedCounts
LicenseApache-2.0crates.io database dumpNo
Runs on, from listed crates and their direct dependenciesCUDAcrates.io database dumpNo
What shows each backendCUDA: cohere-transcribe-rs feature tch-backend (dependency tch)crates.io database dumpNo
Native code, from listed crates and their dependenciesBinds native code: torch-sys (feature tch-backend). Build uses a native toolchain: cmakecrates.io database dumpNo
Python bindings, from direct dependencies of listed cratesNo Python binding crate foundcrates.io database dumpNo
Crates that depend on a listed crate directly0crates.io database dumpNo

Corrections and review history

Report a correction

No correction applies to this entry.

Judgments

A judgment enters only through an approved issue and a merged pull request.

No judgment applies to this entry.