How does voice AI work? From text to speech, in plain English
How does voice AI work? From text to speech, in plain English
Voice AI turns text into speech in stages. First it cleans up the text and turns letters into sounds. Then it plans rhythm, pitch and pauses. Then a neural audio codec turns that plan into tokens. A decoder turns those tokens back into a waveform. The codec decides how much data a call needs.
The analogy: a voice actor with a shorthand notebook
Think of a voice actor handed a script. First someone cleans it up. Then the actor marks where to pause and where to stress a word. Then the actor speaks.
Voice AI does the same job in software. The script is your text. The cleanup is text normalisation. The markings are prosody. The speaking is the acoustic model and the vocoder. The shorthand notebook is the neural audio codec. If the shorthand is bad, words get lost first in the languages it was rarely trained on.
The pipeline, stage by stage
1. Clean up the text. The front end turns written shortcuts into words a speaker would say. "Dr. Lee, 221B Baker St., $4.50" has to become spoken words. This step is text normalisation. It is where many bad readings start.
2. Turn letters into sounds. Next the system turns letters into phonemes. A phoneme is one distinct sound in a language. English has about 44 of them. Hindi has more. It also has sounds English does not have at all. If the system never learned those sounds, it swaps in the nearest English sound.
3. Plan the rhythm. This step is prosody. It decides how long each sound lasts, where pitch rises and falls, and where pauses go. Prosody is what makes a sentence sound like a question or a joke. Cartesia describes this stage as the acoustic model predicting a mel spectrogram. A mel spectrogram is a picture of the sound, with time on one axis and pitch on the other.
4. Make the waveform. A vocoder turns the plan into a waveform. A waveform is the list of numbers a speaker plays back, thousands per second. In 2016 DeepMind's WaveNet built that waveform one sample at a time. It sounded very natural, but it was slow. In 2020 HiFi-GAN did the same job far faster. Its paper reports 167.9 times faster than real time on a V100 GPU for its main version.
5. The codec shortcut. Since about 2023, many systems have dropped the spectrogram. A neural audio codec compresses audio into discrete tokens. A model predicts those tokens the way a language model predicts words. The codec decodes them back into sound. Microsoft's VALL-E showed the payoff in 2023. Its paper says it was trained on 60,000 hours of English speech. It could imitate a new speaker from a three-second recording.
Diagram: the pipeline you can screenshot
Picture five boxes in a row. Box 1, Text: "Meet me at 5 pm in Koramangala." Box 2, Cleanup and sounds: the text becomes words and phonemes. Box 3, Rhythm plan: a spectrogram or token plan, with marks for pause and stress. Box 4, Audio tokens: a short row of numbered codes, one per frame of sound. Box 5, Waveform: a wavy line, 24,000 samples per second, going to a speaker. Under box 4, add a note: this is the bottleneck. Fewer tokens per second means faster speech and cheaper calls. Under box 2, add a second note: this is where Indian languages break first.
What is a neural speech codec?
A neural speech codec is a trained network that squeezes audio into a tiny description and rebuilds it later. It has three parts. An encoder squeezes the audio down. A quantiser turns it into discrete tokens. A decoder rebuilds the sound.
Bitrate is the number that matters for calls. It is how many bits the codec sends per second of speech. Lower bitrate means less data and cheaper calls. It also means less room for detail, so words can get lost.
Raw audio is huge by comparison. Uncompressed 24 kHz audio at 16 bits per sample needs 384,000 bits per second. That is 24,000 samples times 16 bits. A codec at about 1 kilobit per second squeezes that down by more than 350 times. A one-hour call at 1.09 kbps needs about 0.49 MB. The same hour as raw audio needs about 172.8 MB.
Bitrate alone does not tell you quality. Two codecs at the same bitrate can sound very different. A codec can be excellent in English and weak in Tamil.
Worked example: the bitrate table
This table uses only primary model pages. The IndiCodec numbers were first read on 14 November 2026 and match the page as it stood on 23 November 2026.
| Codec | Bitrate | Tokens per second | Checked on |
|---|---|---|---|
| Raw PCM, 24 kHz, 16 bit | 384 kbps | Raw samples, not tokens | 14 Nov 2026, arithmetic |
| EnCodec, Meta, 2 codebooks | 1.5 kbps | 150 | 14 Nov 2026, Meta EnCodec page |
| Mimi, Kyutai, 8 codebooks | 1.1 kbps | 100 | 14 Nov 2026, Moshi paper and IndiCodec page |
| IndiCodec | 1.09 kbps | 75 | 14 Nov 2026, Hugging Face prakharkhatri/IndiCodec |
| SNAC, 24 kHz | 0.98 kbps | 82 | 14 Nov 2026, IndiCodec page table |
| NeuCodec | 0.80 kbps | 50 | 14 Nov 2026, IndiCodec page table |
| LiquidCodec, Liquid AI | Not disclosed | Not disclosed | 14 Nov 2026, Liquid AI blog, 12 Nov 2026 |
Lower bitrate is cheaper to send. Fewer tokens per second is faster for a language model to predict. IndiCodec uses 75 tokens per second against Mimi at 100. That is 25 percent fewer tokens per second. That figure was verified on the IndiCodec page itself on 14 November 2026.
Liquid AI announced LiquidCodec on 12 November 2026. Its blog says it is a 74 million parameter codec behind LFM3-Audio-2B and LFM3-Omni-2B. It says LiquidCodec replaces Mimi there. The blog does not disclose a bitrate, so the table leaves it blank instead of guessing one.
The arithmetic uses only the published bitrates. Raw PCM is 24,000 times 16, which is 384,000 bits per second. One hour at 1.09 kbps is 0.49 MB. One hour of raw PCM is 172.8 MB. Compression for IndiCodec is 352 times. For Mimi it is 349 times.
IndiCodec, in detail
IndiCodec is an open codec published on Hugging Face under the Apache 2.0 licence. It is built on Neuphonic's NeuCodec, and its training started from NeuCodec's released weights. Its Hugging Face page says it is a 1.09 kbps codec for speech language models and TTS. It turns speech into two streams of tokens and decodes them back to 24 kHz audio. It was trained mostly on English and 10 Indian languages. It is strongest on Indian languages.
The two streams are the design. A content stream runs at 25 Hz and carries the words, at 317 bits per second. An acoustic stream runs at 50 Hz and carries the voice and detail, at 775 bits per second. Together they make 1,092 bits per second, or 1.09 kbps, and 75 tokens per second.
The quality numbers below are the ones the IndiCodec authors publish on their Hugging Face page. They were measured on speakers not seen in training, with every codec scored on the same clips. They are the authors' own results, not an independent benchmark.
On English word error rate, IndiCodec scores 2.5 percent on the Seed-TTS eval against 3.6 percent for Mimi. It scores 2.3 percent on CMU-Arctic against 3.2 percent for Mimi. Lower is better. Word error rate is the share of words a recogniser gets wrong. On Indian-language character error rate on FLEURS, IndiCodec scores 6.3 percent against 14.3 percent for Mimi, 13.3 percent for SNAC, and 8.9 percent for NeuCodec. The original recordings score 5.2 percent. Character error rate is the same idea at the level of single characters. It fits Indian languages better, because their words are long.
The 10 languages are Hindi, Bengali, Gujarati, Kannada, Malayalam, Marathi, Odia, Punjabi, Tamil and Telugu.
Put those numbers side by side and the gap is clear. On Indian-language character error rate, 14.3 divided by 6.3 is about 2.3, so Mimi makes roughly 2.3 times as many character errors as IndiCodec. On tokens, IndiCodec needs 75 per second against Mimi's 100, which is 25 percent fewer.
The page also states two limits. IndiCodec is speech only, not for music. And it is not streaming: the encoder and decoder both attend over the whole clip. That matters for a live voice agent. A live agent cannot wait for the whole clip before it starts.
Why Indian languages are hard
Three problems stack up. First, sounds. Indian languages have sounds English does not have. Second, code-switching. Real Indian speech mixes languages inside one sentence. Third, thin training data.
IndiCodec lists its Indian-language data as Rasa, IndicVoices-R and IndicVoices from AI4Bharat. Its English data comes from Emilia-YODAS, LibriTTS, LibriTTS-R and VCTK. The page does not give hours per language, so none are given here. Test any voice system in your language before you trust it.
Voice character and control
Early voice systems had one voice per model. Modern systems separate the words from the voice. You give the model a short sample of a voice, or a description of a style, and it carries that voice across new sentences. I think of it as styling a voice the way CSS styles a web page.
In practice, a voice sample prompts the model. A style description sets pace and pitch in words. A streaming model like Cartesia Sonic keeps delay low. Cartesia says Sonic streams with first audio in under 90 milliseconds. That is model latency, the time to the first audio, not the full end-to-end call delay. Cartesia also says Sonic speaks 44 languages.
Cartesia says Sonic 3.6 ranks first on the Artificial Analysis leaderboards. That is Cartesia's own claim about an independent blind listening test. It has not been measured independently for this article. A model can copy a voice from a few seconds of audio. Any serious voice product needs a consent step and a way to mark synthetic speech.
Try this
Pick one sentence with a name and a number in it. For example, "Meet Priya at 5 pm near MG Road." Synthesise it in English and in one Indian language you speak, using any public demo. Listen for three things. Does the name survive? Does the number come out right? Does the pause land in the same place? Write down where each version breaks.
Copy-paste code
This is the usage snippet from the IndiCodec Hugging Face page. The page also lists the install steps and pinned package versions to run first.
pythonimport soundfile as sf from indicodec import IndiCodec codec = IndiCodec.load("model.safetensors") wav, sr = sf.read("speech.wav") content, acoustic = codec.encode(wav, sr) audio = codec.decode(content, acoustic)
The two token arrays are the shorthand notebook from the analogy. content carries the words at 25 Hz. acoustic carries the voice at 50 Hz.
What to remember
Voice AI is a pipeline, not one model. Text cleanup, sounds, rhythm, tokens, waveform. The codec decides how much data a call needs and how fast a model can speak. At about 1 kbps, the best codecs now keep most words in English and, with IndiCodec, in 10 Indian languages too. IndiCodec writes a shorter notebook than Mimi, 75 tokens a second against 100. On the authors' published numbers, it loses fewer words in Indian languages.
FAQs
How does voice AI work in simple terms? Text goes through cleanup, sounds, and a rhythm plan, then a codec turns it into tokens, and a decoder turns those tokens into sound.
What is a neural speech codec? It is a trained network that compresses audio into discrete tokens and rebuilds it later. Its bitrate says how many bits it needs per second of speech.
What bitrate does IndiCodec use? 1.09 kbps, at 75 tokens per second.
How much better is IndiCodec than Mimi on Indian languages? On the authors' numbers, about 2.3 times fewer character errors: 6.3 percent against 14.3 percent for Mimi. It also uses 25 percent fewer tokens per second.
Why does voice AI struggle with Indian languages? It has to handle new sounds, sentences that mix two languages, and thinner training data. Test any voice system in your language before you trust it.
Sources
- IndiCodec model card, Hugging Face, https://huggingface.co/prakharkhatri/IndiCodec, checked 14 November 2026, re-checked against the page as of 23 November 2026.
- Cartesia, What is neural TTS? cartesia.ai/learn/neural-text-to-speech, checked 14 November 2026. Sonic 3.6 ranking and sub-90 millisecond first audio re-checked 21 November 2026 against Cartesia pages.
- Meta EnCodec page, audiocraft.metademolab.com/encodec.html, checked 14 November 2026. EnCodec 1.5 kbps and 150 tokens per second re-checked 21 November 2026 against secondary codec tables.
- Kyutai Mimi via Moshi paper, https://arxiv.org/abs/2410.00037, checked 14 November 2026. Mimi 1.1 kbps, 12.5 Hz, 8 codebooks, 100 tokens per second re-checked 21 November 2026.
- Liquid AI, LiquidCodec blog, liquid.ai/blog/liquidcodec, 12 November 2026, checked 14 November 2026 and re-checked 21 November 2026.
- VALL-E paper, https://arxiv.org/abs/2301.02111, re-checked 21 November 2026: 60,000 hours of English speech, 3-second enrolled recording.
- HiFi-GAN paper, https://arxiv.org/abs/2010.05646, re-checked 21 November 2026: 167.9 times faster than real time on a V100 GPU.
