Skip to content

In development. Expect rough edges and changes. The source code is not public yet.

Together AI 7 min read Case study hardMaster

How Together AI built the world’s fastest speech-to-text stack

Speech-to-text serving is a full-path systems problem, because ASR models are small while audio inputs are large and need heavy CPU preprocessing. Together optimized Parakeet-TDT 0.6B v3 and Whisper Large v3 at each layer of that path. Multi-profile TensorRT engines tune the encoder for real audio shapes instead of padding short chunks. Conditional CUDA graph nodes move the decoder's BLANK-token branch onto the GPU, making the decoder 2-3x faster. Persistent Unix domain sockets, shared memory and fewer process hops cut copy overhead, epoll replaces thread-per-connection streaming to tame GIL contention, and gc.freeze() after startup preallocation removed periodic ~200 ms p95 spikes caused by full Python GC passes.

Related posts

  • Transcribe speech 100x faster and 100x cheaper with open models

    Modal mediumAdept

    Open-weights ASR models such as NVIDIA's parakeet-tdt-0.6b-v2 and canary-1b-flash, deployed as a batch transcription service on Modal GPUs, transcribed about a week of ESB benchmark audio in roughly a minute for about $1. That works out to over 100x faster or up to 200x cheaper than a popular proprietary API, at matching or slightly lower WER. The gains come from measuring end-to-end throughput including cold starts and data transfer, shuffling files before dealing them into requests to balance load across workers, and sorting audio by duration within each GPU worker so batch lanes finish together. Parallel threaded downloads also help. Sweeping GPU type and worker count produces a Pareto frontier of cost-versus-speed configurations rather than a single optimum.

  • Optimizing Bark using 🤗 Transformers

    Hugging Face mediumAdept

    Bark, Suno's four-stage transformer text-to-speech model, can be made much cheaper to run in 🤗 Transformers with three one-line optimizations: Better Transformer (Flash Attention kernel fusion), fp16 half-precision, and CPU offload of idle sub-models via Accelerate. On a 100-iteration benchmark of bark-large on a TITAN RTX, combining all three cut latency 23% and memory 80% (5 GB to about 1 GB) at batch size 1. At batch size 8, fp16 roughly halves latency and nearly doubles throughput. Better Transformer is effectively free, while offload trades about 10% speed for large memory savings.

  • Speech Synthesis, Recognition, and More With SpeechT5

    Hugging Face mediumAdept

    SpeechT5, Microsoft Research Asia's unified speech model, is now in 🤗 Transformers. It uses one shared Transformer encoder-decoder with task-specific pre-nets and post-nets to handle text-to-speech, speech-to-text and speech-to-speech. The model is pre-trained jointly on text and speech so both share one hidden representation space, then fine-tuned per task. Code walkthroughs cover TTS with x-vector speaker embeddings and a HiFi-GAN vocoder, voice conversion, and character-level ASR without punctuation, and they flag limits such as voice conversion sometimes cutting off early at pauses.

  • Blazingly fast whisper transcriptions with Inference Endpoints

    Hugging Face easyNovice

    Hugging Face Inference Endpoints now offers a Whisper deployment built on vLLM that delivers up to roughly 8x higher real-time factor (RTFx) than the Transformers implementation, with comparable word error rate. It targets NVIDIA Ada Lovelace GPUs (L4, L40s) and gets its speedup from torch.compile JIT kernels, CUDA graphs that batch GPU kernel launches, and a float8 KV cache that halves cache memory versus bfloat16. Whisper Large V3, V3-Turbo and Distil-Whisper V3.5 were benchmarked for WER on 8 Open ASR Leaderboard datasets and for RTFx on 45+ minute rev16 audio using a single L4. Deployment is one click, and the endpoint is called through an OpenAI-style /audio/transcriptions HTTP API; a FastRTC demo shows real-time transcription.

  • Powerful ASR + diarization + speculative decoding with Hugging Face Inference Endpoints

    Hugging Face mediumAdept

    A custom inference handler on Hugging Face Inference Endpoints serves Whisper ASR, Pyannote speaker diarization and speculative decoding behind a single API endpoint. The handler is split into model settings, inference config and diarization utilities, with models chosen via Pydantic environment variables. Creating the endpoint through the API is needed to pass the HF token that diarization requires. A k6 benchmark on an A10 GPU shows distil-large-v3 as assistant model cutting latency on 8s audio from ~784ms to ~327ms but slowing 60s audio (3.48s to 4.15s). Speculative decoding requires batch size 1, so batching wins for long, chunked inputs.

The quest for software engineering knowledge.

Look:
Layout: