File size: 9,476 Bytes
45903cd b2cef04 9f4efd5 4e86464 9f4efd5 1a75c51 45903cd 9f4efd5 28b929e 172fc28 3321966 39d3588 28b929e 7d513f5 28b929e 9f4efd5 c20e841 72cfa35 c20e841 358e8b9 ef24096 9f4efd5 ae6b17b 3c00c2e 2f50c8b ae6b17b 2f50c8b b0c5cf5 ae6b17b 1861fba 9f4efd5 c20e841 9f4efd5 1861fba 9f4efd5 1861fba 9f4efd5 1861fba 9f4efd5 1861fba 9f4efd5 1861fba 9f4efd5 3ab4b33 c100a75 1861fba c100a75 2fc3ae1 c100a75 1861fba c100a75 1861fba c100a75 3ab4b33 39ad561 e1756aa b2cef04 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 | ---
license: llama3.2
base_model: meta-llama/Llama-3.2-3B
language:
- en
- ja
- de
- fr
- es
- ch
- ar
- it
- pl
- pt
tags:
- tts
- text-to-speech
- speech-language-model
arxiv: 2602.23068
---
<h1 align="center">TADA: A Generative Framework for Speech Modeling via Text-Acoustic Dual Alignment</h1>
<p align="center">
<a href="https://arxiv.org/abs/2602.23068"><img src="https://img.shields.io/badge/arXiv-Paper-b31b1b.svg" alt="Paper"></a>
<a href="https://huggingface.co/spaces/fffiloni/tada-dual-alignment-tts-demo"><img src="https://img.shields.io/badge/%F0%9F%A4%97%20Hugging%20Face-Demo-pink" alt="Demo"></a>
<a href="https://huggingface.co/spaces/HumeAI/tada"><img src="https://img.shields.io/badge/%F0%9F%A4%97%20Hugging%20Face-Demo-blue" alt="Demo"></a>
<a href="https://huggingface.co/collections/HumeAI/tada"><img src="https://img.shields.io/badge/%F0%9F%A4%97%20Hugging%20Face-Collection-yellow" alt="Collection"></a>
<a href="https://pypi.org/project/hume-tada/"><img src="https://img.shields.io/badge/PyPI-hume--tada-3775A9.svg?logo=pypi&logoColor=white" alt="PyPI"></a>
<a href="https://www.hume.ai/blog/opensource-tada"><img src="https://img.shields.io/badge/Blog-Post-orange.svg" alt="Blog"></a>
</p>
<img width="2400" height="1260" alt="image" src="https://github.com/user-attachments/assets/800eb8c5-eb6f-4e03-b8f3-150055a6cdfc" />
<p align="center"><br/><em>A unified speech-language model that synchronizes speech and text into a single, cohesive stream via 1:1 alignment.</em></p>
---
# Text-Acoustic Dual-Alignment Large Language Model
TADA is a unified speech-language model that synchronizes speech and text into a single, cohesive stream via 1:1 alignment. By leveraging a novel tokenizer and architectural design, TADA achieves high-fidelity synthesis and generation with a fraction of the computational overhead required by traditional models.
⭐️ arxiv: https://arxiv.org/abs/2602.23068 \
⭐️ demo1: https://huggingface.co/spaces/fffiloni/tada-dual-alignment-tts-demo \
⭐️ demo2: https://huggingface.co/spaces/HumeAI/tada \
⭐️ github: https://github.com/HumeAI/tada \
⭐️ blog post: https://www.hume.ai/blog/opensource-tada
## Key Features
- 1:1 Token Alignment: Unlike standard models, TADA’s tokenizer encodes audio into a sequence of vectors that perfectly matches the number of text tokens.
- Dynamic Duration Synthesis: As a TTS model, it generates the full speech segment for a text token in a single autoregressive step, regardless of length. This eliminates the need for fixed-frame-rate processing.
- Dual-Stream Generation: In speech-language modeling mode, it generates a text token and the speech for the preceding token simultaneously, maintaining the same context length and minimal overhead compared to text-only generation.
- Efficiency & Reliability: TADA delivers superior expressiveness and natural flow while significantly reducing the computational cost associated with fixed audio frame rates.
## How It Works
### The Tokenization Schema
TADA unifies modalities by ensuring that for every word or subword token, there is exactly one corresponding speech vector. This synchronized stream allows the model to "understand" the precise timing of speech relative to text.
### Dynamic Autoregression
Most TTS models require a fixed number of steps to produce one second of audio (e.g., 50 frames per second). TADA breaks this constraint:
- Each autoregressive step covers one text token.
- The model dynamically determines the duration and prosody for that specific token.
- This results in a more natural flow and eliminates transcript hallucination.
## Evaluation
<table>
<tr>
<td><img src="final-graphics-polished/CER.png" alt="CER" height="200px"></td>
<td><img src="final-graphics-polished/real-time.png" alt="Speed" height="200px"></td>
</tr>
<tr>
<td><img src="final-graphics-polished/MOS.png" alt="MOS" height="200px"></td>
<td><img src="final-graphics-polished/naturalness.png" alt="Speaker Similarity" height="200px"></td>
</tr>
</table>
## Prerequisites
TADA models are built on [Meta Llama 3.2](https://huggingface.co/meta-llama). You must request access to the Llama models before using TADA:
- Visit [meta-llama/Llama-3.2-1B](https://huggingface.co/meta-llama/Llama-3.2-1B) or [meta-llama/Llama-3.2-3B](https://huggingface.co/meta-llama/Llama-3.2-3B) and accept the license agreement
## Installation
From the github repo
```bash
pip install git+https://github.com/HumeAI/tada.git
```
From source
```bash
pip install -e .
```
## Models
We provide several model checkpoints:
| Model | Base Model | HuggingFace Hub |
| ------- | ------------ | --------------------------------------------------------- |
| TADA-1B | Llama 3.2 1B | [`HumeAI/tada-1b`](https://huggingface.co/HumeAI/tada-1b) |
| TADA-3B-ml | Llama 3.2 3B | [`HumeAI/tada-3b-ml`](https://huggingface.co/HumeAI/tada-3b-ml) |
All models use the same encoder ([`HumeAI/tada-codec`](https://huggingface.co/HumeAI/tada-codec)) and can be loaded using the same API.
## Run Inference
### Text-to-Speech
```python
import torch
import torchaudio
from tada.modules.encoder import Encoder, EncoderOutput
from tada.modules.tada import TadaForCausalLM
device = "cuda"
# Encoder is loaded separately (not inside the model)
encoder = Encoder.from_pretrained("HumeAI/tada-codec", subfolder="encoder").to(device)
model = TadaForCausalLM.from_pretrained("HumeAI/tada-3b-ml", torch_dtype=torch.bfloat16).to(device)
audio, sample_rate = torchaudio.load("samples/ljspeech.wav")
audio = audio.to(device)
prompt_text = "The examination and testimony of the experts, enabled the commission to conclude that five shots may have been fired."
prompt = encoder(
audio, text=[prompt_text], sample_rate=sample_rate
)
# Optional: save prompt to skip encoder on future runs
# prompt.save("prompt_cache.pt")
# prompt = EncoderOutput.load("prompt_cache.pt", device=device)
output = model.generate(
prompt=prompt,
text="Please call Stella. Ask her to bring these things with her from the store.",
)
```
### Multilingual Generation
TADA supports multilingual speech synthesis via language-specific aligners. Pass the `language` parameter when loading the encoder to use the appropriate aligner for your target language.
```python
import torch
import torchaudio
from tada.modules.encoder import Encoder
from tada.modules.tada import TadaForCausalLM
device = "cuda"
encoder = Encoder.from_pretrained("HumeAI/tada-codec", subfolder="encoder", language="ja").to(device)
model = TadaForCausalLM.from_pretrained("HumeAI/tada-3b-ml", torch_dtype=torch.bfloat16).to(device)
# Load a reference audio clip in the target language
audio, sample_rate = torchaudio.load("samples/ja_prompt.wav")
audio = audio.to(device)
# For non-English prompts, provide the transcript so the encoder uses forced alignment
# instead of the built-in ASR (which is English-only)
prompt_text = "このムキムキのお兄さんがいるし バーだし少し高そうだと思いますよねこのバーの料金設定は良心的でした まあそんなに高くなかったです"
prompt = encoder(audio, text=[prompt_text], sample_rate=sample_rate)
output = model.generate(
prompt=prompt,
text="今日はとても良い天気ですね。散歩に行きましょう。",
)
```
Supported languages: `ar`, `ch`, `de`, `es`, `fr`, `it`, `ja`, `pl`, `pt`. When `language` is not specified, the default English aligner is used.
> **Note:** For non-English prompts, you should provide the transcript of the reference audio via the `text` parameter. The encoder's built-in ASR is English-only. The generation will still work, but alignment quality will be degraded.
You can inspect the prompt alignment to verify it looks correct:
```python
prompt.print_alignment(model.tokenizer)
```
This shows a dot-span visualization of the token-to-audio alignment — dots represent frame gaps, tokens appear at their aligned positions:
```
34 tokens | 10.50s audio
······The··exam····ination··and·····test···imony··of···the
```
- If alignment looks wrong (tokens bunched together, missing tokens, nonsensical text), check that you provided the correct transcript.
- This is especially important for non-English prompts where the built-in ASR cannot be used.
### Speech continuation
Provide `num_extra_steps` if you want to generate text-speech continuation of the prompt:
```python
output = model.generate(
prompt=prompt,
num_extra_steps=50
)
```
## 📚 Citation
If you use this project in your research, please cite our paper:
```bibtex
@article{dang2026tada,
title={TADA: A Generative Framework for Speech Modeling via Text-Acoustic Dual Alignment},
author={Dang, Trung and Rao, Sharath and Gupta, Ananya and Gagne, Christopher and Tzirakis, Panagiotis and Baird, Alice and Cłapa, Jakub Piotr and Chin, Peter and Cowen, Alan},
journal={arXiv preprint arXiv:2602.23068},
year={2026}
}
```
## Contact
Hume AI is an empathic AI research company. We research the datasets, tools, and models needed to give empathy to AI models to serve human wellbeing. If you're interested in any of our product or research collaborations, please reach out to us at hello@hume.ai
## Acknowledgements
This project is built using Llama 3.2.
Llama 3.2 is licensed under the Llama 3.2 Community License
|