Skip to main content

VITS Models

VITS (Variational Inference with adversarial learning for end-to-end Text-to-Speech) models provide fast, high-quality speech synthesis. They’re widely used in production applications and available from multiple sources: Piper, Coqui, MeloTTS, and MMS.

Model Architecture

VITS is a single-model end-to-end TTS architecture:
  • Model (model.onnx or vits-*.onnx) – Neural TTS model
  • Tokens (tokens.txt) – Text token vocabulary
  • Optional: lexicon.txt, espeak-ng-data (for phoneme-based models)

When to Use

Fast TTS

Real-time speech generation with low latency

Streaming Playback

Incremental audio generation for interactive apps

Multi-Speaker

Many voices available in a single model

Production Apps

Battle-tested, widely deployed models

VITS Variants

Piper

Piper is a collection of high-quality VITS models with excellent voice coverage:
  • Many languages and voices
  • Fast inference
  • Excellent quality
  • Multiple speaker support
  • Widely used in production

Coqui

Coqui VITS models:
  • High-quality voices
  • Multilingual support
  • Good for expressive speech

MeloTTS

MeloTTS models:
  • Optimized for speed
  • Multilingual (English, Spanish, Chinese, etc.)
  • Good quality with fast inference

MMS (Massively Multilingual Speech)

MMS from Meta:
  • 1000+ languages
  • Good for low-resource languages
  • Larger models, slower inference

Supported Languages

VITS models (especially Piper) support:
  • English (US, UK, and other accents) – Many voices
  • Spanish, French, German, Italian, Portuguese
  • Chinese, Japanese, Korean
  • And many more (depends on model source)
Piper alone has 200+ voices across 50+ languages.

Performance Characteristics

VITS/Piper Models

Download Piper, Coqui, MeloTTS, and MMS models

Configuration Example

Basic TTS

With Model Options

Streaming TTS with Live Playback

Multi-Speaker Selection

Model Options

VITS models support three tuning parameters:

Tuning Examples

Runtime Parameter Updates

You can update parameters without reloading the model:

Model Detection

VITS models are detected automatically:
  • Folder name should contain vits (when used with other TTS models)
  • Files: model.onnx or vits-*.onnx, plus tokens.txt
  • Optional: lexicon.txt, espeak-ng-data directory

Performance Tips

Optimize Thread Count

Use Streaming for Long Text

For text longer than a few sentences, use streaming to start playback earlier:

Hardware Acceleration

Streaming Support

Streaming: ✅ YesVITS models have excellent streaming support. Use generateSpeechStream() for low-latency, incremental audio generation.
See the Streaming TTS Guide for more details.

Advantages

  1. Fast Inference: Real-time capable on mobile devices
  2. High Quality: Natural-sounding speech
  3. Streaming: Native incremental generation
  4. Multi-Speaker: Many voices in a single model
  5. Wide Language Coverage: Especially with Piper models
  6. Small Size: 10-50 MB per voice
  7. Production-Ready: Battle-tested in many applications

Limitations

  1. No Voice Cloning: Cannot synthesize custom voices from reference audio (use Zipvoice or Pocket instead)
  2. Fixed Voices: Speaker selection limited to model’s trained voices
  3. Prosody Control: Limited control over emotion and emphasis

Use Cases

Voice Assistants

Fast, responsive voice interfaces

Screen Readers

Accessibility applications with streaming TTS

E-Learning

Clear narration for educational content

Audiobooks

Long-form audio generation with streaming

Navigation

Real-time turn-by-turn directions

Notifications

Short audio alerts and messages

Common Issues

  • Verify model.onnx (or vits-*.onnx) and tokens.txt are present
  • Check that model path is correct
  • Ensure sufficient device memory
  • For Piper models, ensure espeak-ng-data directory is included if required
  • Adjust noiseScale (lower for clearer speech)
  • Try different lengthScale values
  • Ensure correct sample rate for playback
  • Check if audio is being resampled incorrectly
  • Increase numThreads on multi-core devices
  • Use hardware acceleration (provider: 'nnapi' or 'xnnpack')
  • Use smaller/faster VITS models
  • Ensure no other heavy apps are running
  • Ensure onChunk handler is lightweight
  • Write chunks to native player immediately (don’t buffer in JS)
  • Increase buffer sizes in native audio player
  • Use fewer threads to reduce chunk latency

Comparison with Other Models

Next Steps

TTS API

Detailed API documentation

Streaming TTS

Low-latency streaming guide

Model Setup

How to download and bundle models

Execution Providers

Hardware acceleration options