How myshell-ai/openvoice works
OpenVoice is a voice-cloning and speech-generation system. Its user-facing workflow accepts text and speaker/reference audio, prepares text and speaker representations, synthesizes speech or converts voice tone, and returns audio. The README also describes multilingual and voice-style capabilities; the sampled API directly exposes English/Chinese TTS and tone-color conversion, while the app and extractor provide the broader interface. The graph includes the model and text-processing layers; some internal app wiring and unsampled capabilities are shown only where documented or indexed.
Main entry points: api.py Text-to-Speech · models.py Synthesizer Model · openvoice_app.py Demo App · __init__.py Text Sequencing
Components 18
User Interface
- Demo App
openvoice/openvoice_app.py
Speech Workflows
- Speaker Extractor
openvoice/se_extractor.py - Text-to-Speech
openvoice/api.py - Tone Converter
openvoice/api.py - Generated Audio
- Runtime Utilities
openvoice/utils.py
Text Processing
- Text Sequencing
openvoice/text/__init__.py - Text Cleaners
openvoice/text/cleaners.py - English Phonemes
openvoice/text/english.py - Chinese Phonemes
openvoice/text/mandarin.py - Speech Symbols
openvoice/text/symbols.py
Model Internals
- Synthesizer Model
openvoice/models.py - Attention Layers
openvoice/attentions.py - Flow Modules
openvoice/modules.py - Spline Transforms
openvoice/transforms.py - Model Utilities
openvoice/commons.py - Spectrogram Processing
openvoice/mel_processing.py
Other components
- User
Connections 21
- User → Demo App: provides input
README.md - Demo App → Text-to-Speech: invokes synthesis
openvoice/openvoice_app.py - Demo App → Tone Converter: invokes conversion
openvoice/openvoice_app.py - Demo App → Speaker Extractor: extracts speaker
openvoice/openvoice_app.py - Text-to-Speech → Text Sequencing: encodes text
openvoice/api.py - Text-to-Speech → Synthesizer Model: runs model
openvoice/api.py - Text-to-Speech → Runtime Utilities: splits sentences
openvoice/api.py - Text-to-Speech → Generated Audio: writes speech
openvoice/api.py - Tone Converter → Synthesizer Model: runs conversion
openvoice/api.py - Tone Converter → Spectrogram Processing: processes audio
openvoice/api.py - Tone Converter → Generated Audio: writes converted audio
openvoice/api.py - Text Sequencing → Text Cleaners: cleans text
openvoice/text/__init__.py - Text Sequencing → Speech Symbols: maps symbols
openvoice/text/__init__.py - Text Cleaners → English Phonemes: normalizes English
openvoice/text/cleaners.py - Text Cleaners → Chinese Phonemes: normalizes Chinese
openvoice/text/cleaners.py - Synthesizer Model → Attention Layers: uses attention
openvoice/models.py - Synthesizer Model → Flow Modules: uses flow layers
openvoice/models.py - Flow Modules → Spline Transforms: uses splines
openvoice/modules.py - Flow Modules → Attention Layers: uses attention
openvoice/modules.py - Attention Layers → Model Utilities: uses helpers
openvoice/attentions.py - Synthesizer Model → Model Utilities: uses helpers
openvoice/models.py