How amp2byte/openvoice works
OpenVoice is a voice-cloning and speech-generation package. The principal workflow is a user submitting text and a target voice, the app obtaining speaker characteristics from reference audio, and the API synthesizing speech and optionally converting tone color and watermarking audio. The repository also documents multilingual support and flexible voice-style control. Source excerpts show the API, text processing, and model internals; app and speaker-extraction links are limited to references in the source index, so the graph avoids guessing their detailed call sequence.
Main entry points: api.py Voice API · openvoice_app.py Gradio app · models.py Synthesizer · modules.py Neural modules
Components 19
Application
- Gradio app
openvoice/openvoice_app.py
Voice processing
- Speaker extraction
openvoice/se_extractor.py - Voice API
openvoice/api.py - Watermarking
openvoice/api.py
Text processing
- Language conversion
openvoice/text/english.py - Mandarin conversion
openvoice/text/mandarin.py - Text cleaners
openvoice/text/cleaners.py - Phone sequences
openvoice/text/__init__.py - Phone symbols
openvoice/text/symbols.py
Synthesis model
- Synthesizer
openvoice/models.py - Attention layers
openvoice/attentions.py - Neural modules
openvoice/modules.py - Spline transforms
openvoice/transforms.py - Model utilities
openvoice/commons.py - Mel processing
openvoice/mel_processing.py
Other components
- User
- Reference audio
- Generated audio
- Text input
Connections 23
- User → Gradio app: submits request
README.md - Reference audio → Gradio app: provides voice
README.md - Text input → Gradio app: provides text
README.md - Gradio app → Voice API: uses API
openvoice/openvoice_app.py - Gradio app → Speaker extraction: uses extractor
openvoice/openvoice_app.py - Voice API → Phone sequences: encodes text
openvoice/api.py - Phone sequences → Text cleaners: cleans text
openvoice/text/__init__.py - Phone sequences → Phone symbols: maps symbols
openvoice/text/__init__.py - Text cleaners → Language conversion: converts English
openvoice/text/cleaners.py - Text cleaners → Mandarin conversion: converts Chinese
openvoice/text/cleaners.py - Voice API → Synthesizer: runs synthesis
openvoice/api.py - Voice API → Mel processing: processes spectrogram
openvoice/api.py - Synthesizer → Model utilities: uses utilities
openvoice/models.py - Synthesizer → Neural modules: uses layers
openvoice/models.py - Synthesizer → Attention layers: uses attention
openvoice/models.py - Neural modules → Model utilities: uses utilities
openvoice/modules.py - Neural modules → Spline transforms: uses splines
openvoice/modules.py - Neural modules → Attention layers: uses attention
openvoice/modules.py - Attention layers → Model utilities: uses utilities
openvoice/attentions.py - Voice API → Watermarking: adds watermark
openvoice/api.py - Voice API → Generated audio: writes audio
openvoice/api.py - Reference audio → Speaker extraction: extracts speaker
- Speaker extraction → Voice API: provides speaker embedding