TTS Speech Synthesis
Turn text into speech with a local TTS model, and choose a voice and speaking speed.
Open the Agent submenu and choose Audio.
Hover over the corresponding conversation entry in the main menu to view its conversation list. Selecting a conversation opens it. Use Runtime Settings at the top right to adjust the current conversation.
Select the page title to rename the current conversation in place. The hover list only switches conversations. To rename or delete from the list, pin the submenu, then select the conversation title or its trash button.
Table of Contents
- Environment Requirements
- Feature Introduction
- Prerequisites
- Interface Layout
- Supported Languages
- Basic Operations
- Parameter Configuration
- Conversation Management
- Important Notes
Environment Requirements
This feature requires installing GPU or CPU environment dependencies in Settings.
TTS uses Kokoro series models for speech synthesis. Before using, ensure:
- Successfully installed CPU or GPU environment in Settings
- Successfully loaded a TTS (Speech Synthesis) type model in Model Library
GPU Acceleration (Recommended)
- NVIDIA Graphics Cards (Recommended):
- TTS inference supports CUDA acceleration, running faster on NVIDIA GPUs
- Installing GPU environment is recommended for best performance
- AMD Graphics Cards (Limited):
- Windows platform AMD GPU does not support TTS inference acceleration
- AMD users need to use CPU mode for inference
- CPU Mode:
- Pure CPU inference is supported but relatively slower
- Some AMD CPUs may have compatibility issues; if inference fails, try NVIDIA GPU environment
Feature Introduction
TTS (Text-to-Speech) is a dedicated text-to-speech module that supports:
- Bilingual Synthesis: Supports speech synthesis for Chinese and English text
- Multiple Voice Selection: Provides multiple preset voices to choose from
- Speed Adjustment: Can adjust speech playback speed
- Automatic Language Detection: Automatically identifies language based on input text
- Conversational Interaction: Supports multiple generations for easy comparison of different parameter effects
Prerequisites
-
Must Install Environment First
- Go to the Settings page
- Install CPU or GPU environment (GPU environment recommended)
- Wait for environment installation to complete and refresh status
-
Must Load TTS Model First
- Go to the Model Library page
- Import or download a TTS model (currently only Kokoro series models are supported)
- Load a model in the TTS (Speech Synthesis) tab
- After successful model loading, TTS page features will be automatically unlocked
-
Understand Environment Capabilities
- After environment installation, wait for TTS capability detection to complete
- Refresh environment status to check if TTS capability is available
- If capability is unavailable, try reinstalling or repairing the environment
Interface Layout
Open the conversation list from the main menu. Pin the submenu to keep the list on the left; the main area shows the current conversation.
Left Sidebar (Conversation List)
- New Conversation button: Located at the top
- Conversation List: Grouped by time (Today/Yesterday/Last 7 Days/Last 30 Days/Earlier)
- Shows conversation title (automatically generated from first input text)
Right Panel (Generation Area)
- Message List: Displays user input text and generated audio
- Progress Bar: Shown below message list during generation
- Input Box: Bottom area for entering text to convert
- Runtime Settings: Click the gear icon at the top right to open the parameter panel
- Generate Button: Bottom right of toolbar
Prompt When Model Not Loaded: The page shows "Go to Model Library to Load <Speech Synthesis Model>" button, click to jump to Model Library.
Supported Languages
The current version of TTS supports the following languages:
| Language Code | Language | Description |
|---|---|---|
a | American English | American English |
b | British English | British English |
z | Mandarin | Mandarin Chinese |
Automatic Language Detection:
- When language parameter is set to "auto", system automatically detects language based on text content
- Automatically uses Chinese mode when Chinese characters are detected
- Automatically uses English mode when English characters are detected
⚠️ Language Limitations:
- Current version only supports Chinese and English
- Other languages like Japanese require additional dependencies (e.g., pyopenjtalk), not built-in yet
Basic Operations
Create Conversation
- Click New Conversation button at the top of the left sidebar
- System will create a new conversation and automatically switch to it
- Conversation title is automatically generated from input text after first generation
Input Text and Generate
- Enter text to convert in the input box
- Click Generate button or use the send shortcut selected in Settings → General → Editor.
Shift + Enterinserts a new line - System immediately shows user message and starts generation
- After generation completes, AI message will display audio player
Tips:
- Text supports mixed Chinese and English input
- Longer texts are automatically split by paragraphs for processing
- Real-time progress is displayed during generation
Play and Save
- After generation completes, click the audio player to play
- Use Save As button to save audio locally
- Default save format is WAV
Parameter Configuration
Click Runtime Settings (gear icon) at the top right to open the parameter panel.
Basic Parameters
| Parameter | Default | Range | Description |
|---|---|---|---|
| Voice | af_heart | Preset list | Select voice preset |
| Speed | 1.0 | 0.5-2.0 | Speech playback speed, 1.0 is normal speed |
| Language | Auto | auto/a/b/z | Language code, auto for automatic detection |
| Sample Rate | 24000 | 16000/22050/24000/44100 | Output audio sample rate |
Voice Presets
System includes multiple voice presets:
| Voice Name | Gender | Description |
|---|---|---|
| af_heart | Female | Default female voice |
| af_bella | Female | Gentle female voice |
| af_nicole | Female | Clear female voice |
| af_sky | Female | Bright female voice |
| bf_emma | Female | Natural female voice |
| bf_isabella | Female | Soft female voice |
| am_adam | Male | Steady male voice |
| am_michael | Male | Magnetic male voice |
| bm_george | Male | Calm male voice |
| bm_lewis | Male | Clear male voice |
Voice Notes:
af_/bf_prefix indicates female voiceam_/bm_prefix indicates male voice- Available voices depend on the loaded model
Speed Adjustment
| Speed Value | Effect |
|---|---|
| 0.5 | Slow playback |
| 1.0 | Normal speed |
| 1.5 | Fast playback |
| 2.0 | Very fast playback |
Conversation Management
Select Conversation
- Click conversation item in the left list to switch
Rename Conversation
- Pin the submenu to show the conversation list on the left.
- Select the conversation title.
- Enter new title
- Click Confirm
Delete Conversation
- Pin the submenu to show the conversation list on the left.
- Click the trash button beside the conversation.
- Confirm deletion (will delete conversation along with all messages and generated audio records)
Important Notes
Environment Dependencies
-
TTS Dependencies
- TTS feature depends on misaki library for G2P (Grapheme-to-Phoneme) conversion
- This library is installed from PyPI official source, which may be slow in Chinese mainland
- Installation failure does not affect main environment, can be fixed by reinstalling
-
spaCy Models
- TTS feature also depends on spaCy language models (en_core_web_sm, zh_core_web_sm)
- These models are downloaded asynchronously after environment installation
- Download completion time depends on network conditions, may be delayed by tens of seconds to several minutes
- After main environment installation completes, please refresh environment status to confirm if TTS capability is available
-
Capability Status Detection
- TTS capability status after environment refresh is the source of truth
- If TTS capability shows as unavailable, dependencies are not fully installed
- Can reinstall or repair environment to download related dependencies again
Hardware Compatibility
-
Recommended Configuration
- NVIDIA GPU + CUDA environment: Fastest inference speed
- 8GB+ VRAM works better
-
CPU Mode Limitations
- Pure CPU inference is slower, long text generation may take considerable time
- If inference fails, switching to NVIDIA GPU environment is recommended
Generation Limitations
-
Concurrency Limit
- Only one generation task at a time
- Cannot send new messages during generation
-
Text Length
- Supports automatic paragraph splitting for long texts
- Recommended single input not exceeding 2000 characters for best experience
Data Management
-
History Records
- Conversations and messages are persistently stored in local database
- Uninstalling the app will not delete local database
-
Audio Storage
- Generated audio is saved to system temporary directory by default
- Important audio should be saved to specified location promptly
FAQ
Q: Why is TTS feature unavailable?
A: Check the following:
- Has environment been installed in Settings
- Has status been refreshed after environment installation
- Is TTS capability shown as available
- Has TTS model been loaded
Q: Why does the generated speech sound unnatural?
A: Try the following adjustments:
- Check if input text has grammatical errors
- Try different voice presets
- Adjust speed parameter
- Ensure language setting matches text content
Q: TTS dependency installation is slow in Chinese mainland, what to do?
A:
- misaki library is installed from PyPI official source, may be slow on domestic networks
- Keep network stable during installation
- If timeout fails, retry by reinstalling environment
- spaCy models are downloaded asynchronously, please wait patiently and refresh status
Q: What to do if TTS capability is shown as unavailable?
A:
- Refresh environment status, wait for capability detection to complete
- If still unavailable, try reinstalling environment
- Check if network connection is normal
- Check installation logs for specific failure reasons
Related Documentation
- Model Library - Learn how to import and load TTS models
- Environment Configuration - Learn about environment installation details