Speech Synthesis, Recognition, and More With SpeechT5
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.
Related posts
- How Together AI built the world’s fastest speech-to-text stack
Together AI hardMasterSpeech-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.
- Fine-Tune Wav2Vec2 for English ASR in Hugging Face with 🤗 Transformers
Hugging Face mediumAdeptWav2Vec2, pretrained with a contrastive masked objective on 50k+ hours of unlabeled speech, can be fine-tuned with CTC on small labeled datasets for end-to-end English ASR without a language model. The walkthrough fine-tunes the base checkpoint on the 5-hour Timit corpus using 🤗 Transformers and Datasets. It covers building a character-level CTC vocabulary (lowercasing, stripping punctuation, keeping apostrophes, mapping space to a word delimiter, and adding UNK and PAD/blank tokens), and configuring the feature extractor with a matching 16kHz sampling rate and normalization. It also explains why the base checkpoint works better without an attention mask, and evaluates with WER via jiwer while pushing checkpoints to the Hub.
- A Closer Look at Phonon TTS. Launching High-Quality On-Device Speech That Tops the Benchmarks.
Hugging Face mediumAdeptPhonon is a small on-device text-to-speech model family (about 65 MB and 75 MB) built on the Pocket TTS flow-matching lineage, speaking English, French, German, Spanish and Portuguese with 100+ voices. On Hugging Face's Open TTS Leaderboard it ranks first in German and Spanish intelligibility and tops CPU streaming time-to-first-audio at 28 ms for the 31m English model, which is Apache 2.0 licensed. A custom inference framework, ptts, targets more than 10 CPU, GPU and NPU backends. A Transformers integration treats the audio codec as a decoder-only audio tokenizer, represents voices as precomputed speaker-latent tensors, and ships the prompt layout as a chat template, with code examples for generating speech.
- Fine-Tune XLSR-Wav2Vec2 for low-resource ASR with 🤗 Transformers
Hugging Face mediumAdeptXLS-R, the multilingual successor to Wav2Vec2 pre-trained on roughly half a million hours of audio in 128 languages, can be fine-tuned for speech recognition by adding a linear layer on top and training with Connectionist Temporal Classification (CTC). The walkthrough fine-tunes the 300M-parameter checkpoint on about 4 hours of Turkish Common Voice data using 🤗 Transformers and Datasets. It covers text normalization (stripping punctuation, lowercasing, replacing hatted characters), building a character-level vocabulary with word-delimiter, unknown and CTC blank/padding tokens, and setting up the Wav2Vec2CTCTokenizer and feature extractor, with word error rate as the evaluation metric.
- Powerful ASR + diarization + speculative decoding with Hugging Face Inference Endpoints
Hugging Face mediumAdeptA 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.