Updates to TTS Engines

This commit is contained in:
erew123 authored and GitHub committed 2024-11-22 07:32:38 +00:00
1 parent 7e73053fd7
commit 1a5c10710d
19 files changed
+6420 -2572

No files matched your search

+60 -60
View File
@@ -1,61 +1,61 @@
{
"first_start_model": "xttsv2_2.0.3",
"models": [
{
"model_name": "xttsv2_2.0.3",
"folder_path": "xttsv2_2.0.3",
"files_to_download": {
"LICENSE.txt": "https://huggingface.co/coqui/XTTS-v2/resolve/v2.0.3/LICENSE.txt?download=true",
"README.md": "https://huggingface.co/coqui/XTTS-v2/resolve/v2.0.3/README.md?download=true",
"config.json": "https://huggingface.co/coqui/XTTS-v2/resolve/v2.0.3/config.json?download=true",
"model.pth": "https://huggingface.co/coqui/XTTS-v2/resolve/v2.0.3/model.pth?download=true",
"dvae.pth": "https://huggingface.co/coqui/XTTS-v2/resolve/v2.0.3/dvae.pth?download=true",
"mel_stats.pth": "https://huggingface.co/coqui/XTTS-v2/resolve/v2.0.3/mel_stats.pth?download=true",
"speakers_xtts.pth": "https://huggingface.co/coqui/XTTS-v2/resolve/v2.0.3/speakers_xtts.pth?download=true",
"vocab.json": "https://huggingface.co/coqui/XTTS-v2/resolve/v2.0.3/vocab.json?download=true"
}
},
{
"model_name": "xttsv2_2.0.2",
"folder_path": "xttsv2_2.0.2",
"files_to_download": {
"LICENSE.txt": "https://huggingface.co/coqui/XTTS-v2/resolve/v2.0.2/LICENSE.txt?download=true",
"README.md": "https://huggingface.co/coqui/XTTS-v2/resolve/v2.0.2/README.md?download=true",
"config.json": "https://huggingface.co/coqui/XTTS-v2/resolve/v2.0.2/config.json?download=true",
"model.pth": "https://huggingface.co/coqui/XTTS-v2/resolve/v2.0.2/model.pth?download=true",
"dvae.pth": "https://huggingface.co/coqui/XTTS-v2/resolve/v2.0.2/dvae.pth?download=true",
"mel_stats.pth": "https://huggingface.co/coqui/XTTS-v2/resolve/v2.0.2/mel_stats.pth?download=true",
"speakers_xtts.pth": "https://huggingface.co/coqui/XTTS-v2/resolve/v2.0.2/speakers_xtts.pth?download=true",
"vocab.json": "https://huggingface.co/coqui/XTTS-v2/resolve/v2.0.2/vocab.json?download=true"
}
},
{
"model_name": "xttsv2_2.0.1",
"folder_path": "xttsv2_2.0.1",
"files_to_download": {
"LICENSE.txt": "https://huggingface.co/coqui/XTTS-v2/resolve/v2.0.1/LICENSE.txt?download=true",
"README.md": "https://huggingface.co/coqui/XTTS-v2/resolve/v2.0.1/README.md?download=true",
"config.json": "https://huggingface.co/coqui/XTTS-v2/resolve/v2.0.1/config.json?download=true",
"model.pth": "https://huggingface.co/coqui/XTTS-v2/resolve/v2.0.1/model.pth?download=true",
"dvae.pth": "https://huggingface.co/coqui/XTTS-v2/resolve/v2.0.1/dvae.pth?download=true",
"mel_stats.pth": "https://huggingface.co/coqui/XTTS-v2/resolve/v2.0.1/mel_stats.pth?download=true",
"speakers_xtts.pth": "https://huggingface.co/coqui/XTTS-v2/resolve/v2.0.1/speakers_xtts.pth?download=true",
"vocab.json": "https://huggingface.co/coqui/XTTS-v2/resolve/v2.0.1/vocab.json?download=true"
}
},
{
"model_name": "xttsv2_2.0.0",
"folder_path": "xttsv2_2.0.0",
"files_to_download": {
"LICENSE.txt": "https://huggingface.co/coqui/XTTS-v2/resolve/v2.0.0/LICENSE.txt?download=true",
"README.md": "https://huggingface.co/coqui/XTTS-v2/resolve/v2.0.0/README.md?download=true",
"config.json": "https://huggingface.co/coqui/XTTS-v2/resolve/v2.0.0/config.json?download=true",
"model.pth": "https://huggingface.co/coqui/XTTS-v2/resolve/v2.0.0/model.pth?download=true",
"dvae.pth": "https://huggingface.co/coqui/XTTS-v2/resolve/v2.0.0/dvae.pth?download=true",
"mel_stats.pth": "https://huggingface.co/coqui/XTTS-v2/resolve/v2.0.0/mel_stats.pth?download=true",
"speakers_xtts.pth": "https://huggingface.co/coqui/XTTS-v2/resolve/v2.0.0/speakers_xtts.pth?download=true",
"vocab.json": "https://huggingface.co/coqui/XTTS-v2/resolve/v2.0.0/vocab.json?download=true"
}
}
]
{
"first_start_model": "xttsv2_2.0.3",
"models": [
{
"model_name": "xttsv2_2.0.3",
"folder_path": "xttsv2_2.0.3",
"files_to_download": {
"LICENSE.txt": "https://huggingface.co/coqui/XTTS-v2/resolve/v2.0.3/LICENSE.txt?download=true",
"README.md": "https://huggingface.co/coqui/XTTS-v2/resolve/v2.0.3/README.md?download=true",
"config.json": "https://huggingface.co/coqui/XTTS-v2/resolve/v2.0.3/config.json?download=true",
"model.pth": "https://huggingface.co/coqui/XTTS-v2/resolve/v2.0.3/model.pth?download=true",
"dvae.pth": "https://huggingface.co/coqui/XTTS-v2/resolve/v2.0.3/dvae.pth?download=true",
"mel_stats.pth": "https://huggingface.co/coqui/XTTS-v2/resolve/v2.0.3/mel_stats.pth?download=true",
"speakers_xtts.pth": "https://huggingface.co/coqui/XTTS-v2/resolve/v2.0.3/speakers_xtts.pth?download=true",
"vocab.json": "https://huggingface.co/coqui/XTTS-v2/resolve/v2.0.3/vocab.json?download=true"
}
},
{
"model_name": "xttsv2_2.0.2",
"folder_path": "xttsv2_2.0.2",
"files_to_download": {
"LICENSE.txt": "https://huggingface.co/coqui/XTTS-v2/resolve/v2.0.2/LICENSE.txt?download=true",
"README.md": "https://huggingface.co/coqui/XTTS-v2/resolve/v2.0.2/README.md?download=true",
"config.json": "https://huggingface.co/coqui/XTTS-v2/resolve/v2.0.2/config.json?download=true",
"model.pth": "https://huggingface.co/coqui/XTTS-v2/resolve/v2.0.2/model.pth?download=true",
"dvae.pth": "https://huggingface.co/coqui/XTTS-v2/resolve/v2.0.2/dvae.pth?download=true",
"mel_stats.pth": "https://huggingface.co/coqui/XTTS-v2/resolve/v2.0.2/mel_stats.pth?download=true",
"speakers_xtts.pth": "https://huggingface.co/coqui/XTTS-v2/resolve/v2.0.2/speakers_xtts.pth?download=true",
"vocab.json": "https://huggingface.co/coqui/XTTS-v2/resolve/v2.0.2/vocab.json?download=true"
}
},
{
"model_name": "xttsv2_2.0.1",
"folder_path": "xttsv2_2.0.1",
"files_to_download": {
"LICENSE.txt": "https://huggingface.co/coqui/XTTS-v2/resolve/v2.0.1/LICENSE.txt?download=true",
"README.md": "https://huggingface.co/coqui/XTTS-v2/resolve/v2.0.1/README.md?download=true",
"config.json": "https://huggingface.co/coqui/XTTS-v2/resolve/v2.0.1/config.json?download=true",
"model.pth": "https://huggingface.co/coqui/XTTS-v2/resolve/v2.0.1/model.pth?download=true",
"dvae.pth": "https://huggingface.co/coqui/XTTS-v2/resolve/v2.0.1/dvae.pth?download=true",
"mel_stats.pth": "https://huggingface.co/coqui/XTTS-v2/resolve/v2.0.1/mel_stats.pth?download=true",
"speakers_xtts.pth": "https://huggingface.co/coqui/XTTS-v2/resolve/v2.0.1/speakers_xtts.pth?download=true",
"vocab.json": "https://huggingface.co/coqui/XTTS-v2/resolve/v2.0.1/vocab.json?download=true"
}
},
{
"model_name": "xttsv2_2.0.0",
"folder_path": "xttsv2_2.0.0",
"files_to_download": {
"LICENSE.txt": "https://huggingface.co/coqui/XTTS-v2/resolve/v2.0.0/LICENSE.txt?download=true",
"README.md": "https://huggingface.co/coqui/XTTS-v2/resolve/v2.0.0/README.md?download=true",
"config.json": "https://huggingface.co/coqui/XTTS-v2/resolve/v2.0.0/config.json?download=true",
"model.pth": "https://huggingface.co/coqui/XTTS-v2/resolve/v2.0.0/model.pth?download=true",
"dvae.pth": "https://huggingface.co/coqui/XTTS-v2/resolve/v2.0.0/dvae.pth?download=true",
"mel_stats.pth": "https://huggingface.co/coqui/XTTS-v2/resolve/v2.0.0/mel_stats.pth?download=true",
"speakers_xtts.pth": "https://huggingface.co/coqui/XTTS-v2/resolve/v2.0.0/speakers_xtts.pth?download=true",
"vocab.json": "https://huggingface.co/coqui/XTTS-v2/resolve/v2.0.0/vocab.json?download=true"
}
}
]
}
+458
View File
@@ -0,0 +1,458 @@
# help_content.py
# pylint: disable=no-member
class AllTalkHelpContent:
"""CSS and help content for help_content.py"""
custom_css = """
/* Add this to your existing CSS */
.gradio-container .prose {
max-width: none !important;
padding: 0.5rem !important; /* Reduced padding */
margin: 0 !important;
}
.custom-markdown div {
border: none !important; /* Remove the inner border */
margin-top: 0 !important; /* Remove top margin */
margin-bottom: 0 !important; /* Remove bottom margin */
padding-top: 0 !important; /* Remove top padding */
padding-bottom: 0 !important; /* Remove bottom padding */
}
/* Update the existing custom-markdown class */
.custom-markdown {
font-size: 15px !important;
line-height: 1.6 !important;
color: var(--body-text-color) !important;
background-color: var(--background-fill-primary) !important;
border: 1px solid var(--border-color-primary) !important;
border-radius: 8px !important;
padding: 0.5rem !important;
margin: 0 !important; /* Changed from 1rem 0 to 0 */
max-width: 100% !important;
box-sizing: border-box !important;
/* Default text color for all content (grey) */
color: rgba(156, 163, 175, 1) !important; /* Adjust this grey value to match your interface */
}
/* Make headings white */
.custom-markdown h1,
.custom-markdown h2,
.custom-markdown h3,
.custom-markdown h4,
.custom-markdown h5,
.custom-markdown h6 {
color: var(--heading-text-color, var(--body-text-color)) !important;
font-weight: 600 !important;
}
/* Keep all other elements in the grey color */
.custom-markdown p,
.custom-markdown li,
.custom-markdown ul,
.custom-markdown ol {
color: rgba(156, 163, 175, 1) !important; /* Same grey as the base text */
}
/* Additional targeting for any wrapping elements */
.gradio-container .prose > * {
margin: 0 !important;
padding: 0 !important;
}
/* Update the list item spacing in your existing CSS */
.custom-markdown li {
font-size: 0.95rem !important;
margin-bottom: 0.2rem !important; /* Reduced from 0.5rem to 0.3rem */
}
/* Add specific styling for definition-style lists (like your Default, Recommendation, Tip items) */
.custom-markdown li p {
margin: 0 !important; /* Remove paragraph margins within list items */
}
/* If you need even tighter spacing for specific types of lists */
.custom-markdown li + li {
margin-top: 0.2rem !important; /* Space between consecutive list items */
}
/* Ensure nested lists maintain proper spacing */
.custom-markdown li > ul,
.custom-markdown li > ol {
margin: 0.2rem 0 0.2rem 1rem !important; /* Reduced from 0.5rem */
}
/* Consistent heading styles */
.custom-markdown h2 {
font-size: 1.2rem !important; /* Fixed size relative to root */
font-weight: 600 !important;
margin: 1.5rem 0 1rem !important;
color: var(--heading-text-color, var(--body-text-color)) !important;
border-bottom: 1px solid var(--border-color-primary) !important;
padding-bottom: 0.5rem !important;
}
/* First paragraph styling */
.custom-markdown p:first-of-type {
font-size: 0.95rem !important; /* Match base size */
font-weight: 400 !important;
margin-bottom: 1rem !important;
}
/* Regular paragraphs */
.custom-markdown p {
font-size: 0.95rem !important;
margin: 0.8rem 0 !important;
}
/* List styling */
.custom-markdown ul,
.custom-markdown ol {
margin: 0.8rem 0 !important;
padding-left: 1.5rem !important;
}
/* Code styling */
.custom-markdown code {
font-family: ui-monospace, monospace !important;
background-color: var(--background-fill-secondary) !important;
padding: 0.2rem 0.4rem !important;
border-radius: 4px !important;
font-size: 0.8rem !important; /* Slightly smaller than regular text */
color: var(--body-text-color) !important;
}
/* Add styles for bold and emphasis */
.custom-markdown strong {
font-weight: 600 !important;
color: var(--body-text-color) !important;
}
.custom-markdown em {
font-style: italic !important;
}
/* Ensure both columns take equal width */
.gradio-row > div {
flex: 1 1 50% !important;
min-width: 0 !important; /* Prevents flex items from overflowing */
}
"""
ENGINE_INFORMATION = """
## 🔊 TTS Engine Capabilities Help
This guide explains the various capabilities that **may** be available in different TTS engines and models. Each capability affects how the TTS engine processes and generates speech output.
"""
ENGINE_INFORMATION1 = """
## 🚀 Performance Features
- **DeepSpeed Capable**: Enables GPU acceleration using the DeepSpeed optimization library.
- **Requires**: NVIDIA GPU with CUDA support
- **Benefit**: Significantly faster text-to-speech generation
- **Note**: Model must specifically support DeepSpeed inference
- **Low VRAM Capable**: Optimized for systems with limited GPU memory.
- **Benefit**: Efficient memory management between CPU and GPU
- **Use Case**: Ideal when running alongside other GPU-intensive applications like LLMs
- **Note**: May trade speed for memory efficiency
- **Streaming Capable**: Enables real-time speech generation.
- **Benefit**: Immediate playback without generating entire audio first
- **Use Case**: Interactive applications and real-time responses
- **Note**: Not all output formats support streaming
## 🎵 Voice Control Features
- **Pitch Capable**: Allows adjustment of voice pitch.
- **Benefit**: Creates more expressive and varied speech output
- **Use Case**: Customizing voice characteristics
- **Note**: Adjustment range varies by model
- **Generation Speed Capable**: Controls speech rate.
- **Benefit**: Adjustable playback speed during generation
- **Use Case**: Creating faster or slower speech output
- **Note**: May affect audio quality at extreme settings
- **Temperature Capable**: Controls output randomness.
- **Benefit**: Adjustable speech variation and creativity
- **Use Case**: Balancing consistency vs. naturality
- **Note**: Higher values increase variation but may reduce quality
"""
ENGINE_INFORMATION2 = """
## 🎯 Quality Enhancement Features
- **Repetition Penalty Capable**: Prevents unnatural speech patterns.
- **Benefit**: Reduces repeated sounds and phrases
- **Use Case**: Improving natural flow of longer texts
- **Note**: Strength of penalty may be adjustable
## 🌐 Multi-Feature Support
- **Multi-Languages Capable Models**: Each model Supports multiple languages.
- **Benefit**: Generate speech in different languages
- **Note**: Quality may vary between languages
- **Tip**: Check model-specific language support
- **Multi-Voice Capable**: Supports multiple speaking voices.
- **Benefit**: Different voices or speaking styles
- **Types**: Pre-trained voices or voice cloning
- **Note**: Voice quality may vary by model
- **Multi-Model Capable Engine**: Supports multiple TTS models.
- **Benefit**: Flexibility in model selection
- **Use Case**: Switching between models for different needs
- **Note**: Each model may have different capabilities
## 📁 Technical Features
- **Default Audio Output Format**: Specifies output file format.
- **Common Formats**: WAV, MP3, FLAC, Opus, AAC, PCM
- **Note**: Transcoding to different formats adds processing time
- **Warning**: Not all formats support streaming
- **Platform Support**: Operating system compatibility.
- **Platforms**: Windows, Linux, macOS
- **Note**: Additional setup may be required
- **Warning**: Support level may vary by platform
"""
DEFAULT_SETTINGS = """
## 🎯 TTS Engine Settings Help
This guide explains the settings and configuration options available for individual Text-to-Speech engines within AllTalk.
"""
DEFAULT_SETTINGS1 = """
## 🎚️ Engine Capabilities & Controls
- **Low VRAM Mode**
- Optimizes memory usage for systems with limited GPU memory
- Efficiently manages resources by moving data between CPU and GPU
- Recommended for systems with less than 4GB VRAM or when running alongside other GPU-intensive applications
- **DeepSpeed Capability**
- Accelerates TTS generation using optimized inference
- Only available for engines and models that support DeepSpeed
- Requires NVIDIA GPU with CUDA support
- **Temperature Control**
- Adjusts the variability in speech generation
- **Range**: 0.0 to 1.0
- **Lower values** (0.1-0.5): More consistent, stable output
- **Higher values** (0.6-1.0): More variable, potentially more natural-sounding output
- **Repetition Penalty**
- Helps prevent repetitive speech patterns
- **Range**: 1.0 to 15.0
- Higher values more strongly discourage repetition
- Typically most effective between 1.0-3.0
- **Pitch Adjustment**
- Modifies the voice pitch when supported
- **Range**: -20 to +20
- Use subtle adjustments for most natural results
- **Generation Speed**
- Controls the pace of generated speech
- **Range**: 0.5 to 2.0
- 1.0 represents normal speed
"""
DEFAULT_SETTINGS2 = """
## 🗣️ Voice Configuration
### OpenAI Voice Mappings
- Only relevant when using the OpenAI-compatible API endpoint
- Maps OpenAI's six standard voices to equivalent voices in the current engine:
- `alloy`
- `echo`
- `fable`
- `nova`
- `onyx`
- `shimmer`
- Essential for maintaining compatibility with OpenAI API calls
- Each mapping can be customized to any available voice in the current engine
Information on the OpenAI Endpoint is available in the [Github Wiki](https://github.com/erew123/alltalk_tts/wiki)
### Default Voices
- **Default/Character Voice**: Used when no specific voice is specified in API calls
- **Narrator Voice**: Separate default for narrator-specific text
- These defaults are engine-specific and won't affect other TTS engines
- Can be overridden by explicitly specifying voices in API calls
## ⚙️ Important Notes
- Settings availability is determined by engine capabilities
- Grayed-out options indicate features not supported by the current engine
- Changes only affect the currently selected TTS engine
- Settings here act as defaults but can be overridden via API parameters
- All changes require clicking "Update Settings" to take effect
- Some settings require an engine reload to take effect
"""
HELP_PAGE = """
## 🎯 XTTS Voice Cloning Engine Help
XTTS is a powerful multi-speaker, voice cloning model that can generate speech in multiple languages using short audio samples for voice cloning.
"""
HELP_PAGE1 = """
## 🎚️ Engine Capabilities & Controls
- **DeepSpeed Support**
- Accelerates generation using optimized inference
- Requires NVIDIA GPU with CUDA support
- 2-3x speed improvement in generation
- Recommended when available
- **Multi-Language Support**
- Clone voices across multiple languages
- No need for language-specific training
- Full Hindi support in v2.0.3 (API Local method only)
- Natural-sounding output in target language
- **Generation Methods**
- API Local: Standard generation method
- XTTSv2 Local: Enhanced method with DeepSpeed support
- Each method may produce slightly different results
- Try both methods if voice quality isn't optimal
## 🎤 Voice Sample Creation Guide
### Audio Requirements
- Format: WAV or MP3
- Sample Rate: 22050Hz
- Channels: Mono
- Bit Depth: 16-bit
- Duration: 6-30 seconds (optimal: 8-10 seconds)
### Recording Tips
1. **Audio Quality**
- Choose clear, clean recordings
- Avoid background noise, music, or echoes
- Watch for audio artifacts like hiss or hum
- Ensure consistent volume levels
2. **Speech Content**
- Use flowing, natural speech
- Avoid long pauses or gaps
- Include some emotional range
- Avoid breathing sounds at start/end
- Choose samples with good vocal variety
### Using Audacity
1. **Basic Editing**
- Open your audio file in Audacity
- Select the best 6-30 second segment
- Remove unwanted sounds or silence
2. **Processing Steps**
```
1. Clean up audio if needed (noise reduction, normalization)
2. Tracks > Resample to 22050Hz
3. Tracks > Mix > Stereo to Mono
4. File > Export Audio as WAV
```
## 🗣️ Voice Management
### Single Voice Setup
- Place WAV/MP3 files in `/alltalk_tts/voices/`
- Use descriptive filenames (e.g., `broadcaster_male.wav`)
- Files appear as individual voices in interface
- Best for quick testing or simple use cases
### Multi-Voice Sets
- Create folders in `/alltalk_tts/voices/xtts_multi_voice_sets/`
- Add multiple samples per voice
- System randomly selects up to 5 samples
- Better for consistent voice reproduction
- Example: `/voices/xtts_multi_voice_sets/broadcaster_voice/`
### Pre-computed Latents
- Stored in `/voices/xtts_latents/`
- Faster generation times
- Reduced memory usage
- Recommended for frequently used voices
"""
HELP_PAGE2 = """
## 📝 Model Versions
### v2.0.3 (Recommended)
- Latest stable release
- Full language support including Hindi
- Best overall performance
- Complete feature set
### v2.0.2 (Alternative)
- Stable fallback option
- Good performance
- Use if v2.0.3 has issues
### Required Files
- `config.json`: Model configuration
- `model.pth`: Core model weights
- `mel_stats.pth`: Audio statistics
- `speakers_xtts.pth`: Speaker embeddings
- `vocab.json`: Tokenizer vocabulary
- `dvae.pth`: Discrete VAE weights
## 🔍 Troubleshooting Voice Quality
If voice cloning results aren't satisfactory:
1. **Audio Quality Issues**
- Verify sample meets technical requirements
- Check for background noise
- Ensure proper resampling
- Try processing audio to improve clarity
2. **Generation Options**
- Try both API Local and XTTSv2 Local methods
- Adjust temperature settings
- Use multiple voice samples
- Consider creating latents
3. **Advanced Solutions**
- Try model finetuning (see Github Wiki)
- Use RVC pipeline for additional processing
- Test different voice samples
- Remember: 100% match isn't possible
## 📁 File Management
- **Models**: `/alltalk_tts/models/xtts/`
- **Voice Samples**: `/alltalk_tts/voices/`
- **Multi-Voice Sets**: `/alltalk_tts/voices/xtts_multi_voice_sets/`
- **Latents**: `/alltalk_tts/voices/xtts_latents/`
- **Outputs**: `/alltalk_tts/outputs/`
- Automatic cleanup available
- Configurable retention period
- Set to 'Disabled' to keep all files
## 💡 Best Practices
1. **Sample Selection**
- Use high-quality recordings
- Choose emotionally varied speech
- Avoid background noise
- Test multiple samples
2. **Performance**
- Enable DeepSpeed when available
- Use pre-computed latents
- Consider multi-voice sets
- Monitor system resources
3. **Workflow**
- Process audio before use
- Test both generation methods
- Keep original samples organized
- Regular cleanup of output files
"""
File diff suppressed because it is too large. Load diff
+41 -41
View File
@@ -1,42 +1,42 @@
{
"model_details": {
"manufacturer_name": "Coqui",
"manufacturer_website": "https://github.com/coqui-ai/TTS and also updated engine https://github.com/idiap/coqui-ai-TTS/",
"model_description": "XTTS is a multi-speaker, voice cloning model. XTTS-v2 by Coqui AI is a voice generation model that lets you clone voices into a multitude of languages by using just a mere 6+ second audio sample. It is licenced under Coqui AI's Coqui Public Model License 1.0.0 which allows for `non-commercial use of a machine learning model and its outputs.`"
},
"model_capabilties": {
"audio_format": "wav",
"deepspeed_capable": true,
"generationspeed_capable": true,
"languages_capable": true,
"lowvram_capable": true,
"multimodel_capable": true,
"repetitionpenalty_capable": true,
"streaming_capable": true,
"temperature_capable": true,
"multivoice_capable": true,
"pitch_capable": false,
"windows_capable": true,
"linux_capable": true,
"mac_capable": true
},
"settings": {
"def_character_voice": "female_01.wav",
"def_narrator_voice": "male_01.wav",
"deepspeed_enabled": false,
"engine_installed": true,
"generationspeed_set": 1,
"lowvram_enabled": false,
"pitch_set": 0,
"repetitionpenalty_set": 10,
"temperature_set": 0.75
},
"openai_voices": {
"alloy": "female_01.wav",
"echo": "female_01.wav",
"fable": "female_01.wav",
"nova": "female_01.wav",
"onyx": "female_01.wav",
"shimmer": "female_01.wav"
}
{
"model_details": {
"manufacturer_name": "Coqui",
"manufacturer_website": "https://github.com/coqui-ai/TTS and also updated engine https://github.com/idiap/coqui-ai-TTS/",
"model_description": "XTTS is a multi-speaker, voice cloning model. XTTS-v2 by Coqui AI is a voice generation model that lets you clone voices into a multitude of languages by using just a mere 6+ second audio sample. It is licenced under Coqui AI's Coqui Public Model License 1.0.0 which allows for `non-commercial use of a machine learning model and its outputs.`"
},
"model_capabilties": {
"audio_format": "wav",
"deepspeed_capable": true,
"generationspeed_capable": true,
"languages_capable": true,
"lowvram_capable": true,
"multimodel_capable": true,
"repetitionpenalty_capable": true,
"streaming_capable": true,
"temperature_capable": true,
"multivoice_capable": true,
"pitch_capable": false,
"windows_capable": true,
"linux_capable": true,
"mac_capable": true
},
"settings": {
"def_character_voice": "female_01.wav",
"def_narrator_voice": "male_01.wav",
"deepspeed_enabled": false,
"engine_installed": true,
"generationspeed_set": 1,
"lowvram_enabled": false,
"pitch_set": 0,
"repetitionpenalty_set": 10,
"temperature_set": 0.75
},
"openai_voices": {
"alloy": "female_01.wav",
"echo": "female_01.wav",
"fable": "female_01.wav",
"nova": "female_01.wav",
"onyx": "female_01.wav",
"shimmer": "female_01.wav"
}
}
+19 -85
View File
@@ -4,6 +4,7 @@ import requests
import gradio as gr
from tqdm import tqdm
from pathlib import Path
from .help_content import AllTalkHelpContent
this_dir = Path(__file__).parent.resolve() # Sets up self.this_dir as a variable for the folder THIS script is running in.
main_dir = Path(__file__).parent.parent.parent.parent.resolve() # Sets up self.main_dir as a variable for the folder AllTalk is running in
@@ -128,11 +129,16 @@ def xtts_model_alltalk_settings(model_config_data):
def_narrator_voice_gr = gr.Dropdown(value=model_config_data["settings"]["def_narrator_voice"], label="Narrator Voice", choices=voice_list, allow_custom_value=True)
with gr.Group():
with gr.Row():
details_text = gr.Textbox(label="Details", show_label=False, lines=5, interactive=False, value="In this section, you can set the default settings for this TTS engine. Settings that are not supported by the current engine will be greyed out and cannot be selected. Default voices specified here will be used when no specific voice is provided in the TTS generation request. If a voice is specified in the request, it will override these default settings. When using the OpenAI API compatable API with this TTS engine, the voice mappings will be applied. As the OpenAI API has a limited set of 6 voices, these mappings ensure compatibility by mapping the OpenAI voices to the available voices in this TTS engine.")
details_text = gr.Textbox(label="Details", show_label=False, lines=5, interactive=False, value="Configure default settings and voice mappings for the selected TTS engine. Unavailable options are grayed out based on engine capabilities. See the Help section below for detailed information about each setting.")
with gr.Row():
submit_button = gr.Button("Update Settings")
output_message = gr.Textbox(label="Output Message", interactive=False, show_label=False)
with gr.Accordion("HELP - 🔊 Understanding TTS Engine Default Settings Page", open=False):
with gr.Row():
gr.Markdown(AllTalkHelpContent.DEFAULT_SETTINGS, elem_classes="custom-markdown")
with gr.Row():
gr.Markdown(AllTalkHelpContent.DEFAULT_SETTINGS1, elem_classes="custom-markdown")
gr.Markdown(AllTalkHelpContent.DEFAULT_SETTINGS2, elem_classes="custom-markdown")
submit_button.click(xtts_model_update_settings, inputs=[def_character_voice_gr, def_narrator_voice_gr, lowvram_enabled_gr, deepspeed_enabled_gr, temperature_set_gr, repetitionpenalty_set_gr, pitch_set_gr, generationspeed_set_gr, alloy_gr, echo_gr, fable_gr, nova_gr, onyx_gr, shimmer_gr], outputs=output_message)
###########################################################################################
@@ -166,34 +172,12 @@ def xtts_model_alltalk_settings(model_config_data):
gr.Textbox(label="Linux Support", value='Yes' if features_list['linux_capable'] else 'No', interactive=False)
gr.Textbox(label="Mac Support", value='Yes' if features_list['mac_capable'] else 'No', interactive=False)
with gr.Row():
gr.Markdown("""
#### 🟧 DeepSpeed Capable
DeepSpeed is a deep learning optimization library that can significantly speed up model training and inference. If a model is DeepSpeed capable, it means it can utilize DeepSpeed to accelerate the generation of text-to-speech output. This requires the model to be loaded into CUDA/VRAM on an Nvidia GPU and the model's inference method to support DeepSpeed.
#### 🟧 Pitch Capable
Pitch refers to the highness or lowness of a sound. If a model is pitch capable, it can adjust the pitch of the generated speech, allowing for more expressive and varied output.
#### 🟧 Generation Speed Capable
Generation speed refers to the rate at which the model can generate text-to-speech output. If a model is generation speed capable, it means the speed of the generated speech can be adjusted, making it faster or slower depending on the desired output.
#### 🟧 Repetition Penalty Capable
Repetition penalty is a technique used to discourage the model from repeating the same words or phrases multiple times in the same sounding way. If a model is repetition penalty capable, it can apply this penalty during generation to improve the diversity and naturalness of the output.
#### 🟧 Multi-Languages Capable
Multi-language capable models can generate speech in multiple languages. This means that the model has been trained on data from different languages and can switch between them during generation. Some models are language-specific.
#### 🟧 Multi-Voice Capable
Multi-voice capable models generate speech in multiple voices or speaking styles. This means that the model has been trained on data from different speakers and can mimic their voices during generation, or is a voice cloning model that can generate speech based on the input sample.
""")
gr.Markdown("""
#### 🟧 Streaming Capable
Streaming refers to the ability to generate speech output in real-time, without the need to generate the entire output before playback. If a model is streaming capable, it can generate speech on-the-fly, allowing for faster response times and more interactive applications.
#### 🟧 Low VRAM Capable
VRAM (Video Random Access Memory) is a type of memory used by GPUs to store and process data. If a model is low VRAM capable, it can efficiently utilize the available VRAM by moving data between CPU and GPU memory as needed, allowing for generation even on systems with limited VRAM where it may be competing with an LLM model for VRAM.
#### 🟧 Temperature Capable
Temperature is a hyperparameter that controls the randomness of the generated output. If a model is temperature capable, the temperature can be adjusted to make the output more or less random, affecting the creativity and variability of the generated speech.
#### 🟧 Multi-Model Capable Engine
If an engine is multi-model capable, it means that it can support and utilize multiple models for text-to-speech generation. This allows for greater flexibility and the ability to switch between different models depending on the desired output. Different models may be capable of different languages, specific languages, voices, etc.
#### 🟧 Default Audio Output Format
Specifies the file format in which the generated speech will be saved. Common audio formats include WAV, MP3, FLAC, Opus, AAC, and PCM. If you want different outputs, you can set the transcode function to change the output audio, though transcoding will add a little time to the generation and is not available for streaming generation.
#### 🟧 Windows/Linux/Mac Support
These indicators show whether the model and engine are compatible with Windows, Linux, or macOS. However, additional setup or requirements may be necessary to ensure full functionality on your operating system. Please note that full platform support has not been extensively tested.
""")
with gr.Accordion("HELP - 🔊 Understanding TTS Engine Capabilities", open=False):
with gr.Row():
gr.Markdown(AllTalkHelpContent.ENGINE_INFORMATION, elem_classes="custom-markdown")
with gr.Row():
gr.Markdown(AllTalkHelpContent.ENGINE_INFORMATION1, elem_classes="custom-markdown")
gr.Markdown(AllTalkHelpContent.ENGINE_INFORMATION2, elem_classes="custom-markdown")
with gr.Tab("Models/Voices Download"):
@@ -276,61 +260,11 @@ def xtts_model_alltalk_settings(model_config_data):
###################################################################################################
with gr.Tab("Engine Help"):
with gr.Row():
gr.Markdown("""
### 🟧 Using my own Finetuned models
Please your Finetuned models within their own folder in `/alltalk_tts/models/xtts/`. Once they are in here they will become availabe within the interface after reloading the XTTS engine.<br>
### 🟧 Using Single Voice Samples
Voice samples are stored in `/alltalk_tts/voices/` and should be named using the following format `name.wav`. These files will be listed as `name.wav` in the available voices list.<br>
### 🟧 Using Multiple Voice Samples
If you have multiple voice samples for a single voice, you can organize them into subfolders within the `/alltalk_tts/voices/` directory. Each subfolder should be named according to the voice it contains, up to 5 voice samples will be randomly selected for use.<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;• Each subfolder should reflect the name or type of the voice it contains (e.g., `female_voice`, `male_voice`).<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;• The voice samples inside each subfolder should follow the standard `.wav` format.<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;• An example folder path would be `/alltalk_tts/voices/mynewvoice/` and this would be listed in the available voices list as `mynewvoice/`.<br>
This organization allows for easy selection and management of multiple voice samples while ensuring the system can correctly identify and utilize each voice. Manual CURL API requests would send the folder in the format `mynewvoice/`.
### 🟧 Where are the outputs stored & Automatic output wav file deletion
Voice outputs are stored in `/alltalk_tts/outputs/`. You can configure automatic maintenance deletion of old wav files by setting `Del WAV's older than` in the global settings.<br>
> When `Disabled`, your output wav files will be left untouched.<br>
> When set to a setting `1 Day` or greater, your output wav files older than that time period will be automatically deleted on start-up of AllTalk.<br>
### 🟧 Where are the models stored?
This extension will download the models to `/alltalk_tts/models/xtts/` folder.<br>
### 🟧 API Local, XTTSv2 Generation methods & Speed
These two methods both produce sound output in slightly different ways. XTTSv2 is the perferable method a it supports DeepSpeed, which, if you have a system capable of DeepSpeed genereation, can result in a 2-3x speed gain in generation.
### 🟧 Hindi Support on XTTS
Currently Hindi only works on XTTS model 2.0.3 and it has to be loaded as the API Local method.
""")
gr.Markdown("""
### 🟧 How do I create a new voice sample?
To create a new voice sample, you need to make a wav file that is `22050Hz`, `Mono`, `16 bit` and between 6 to 30 seconds long, though 8 to 10 seconds is usually good enough. The model can handle up to 30 second samples, however I've not noticed any improvement in voice output from much longer clips.<br><br>
You want to find a nice clear selection of audio, so lets say you wanted to clone your favourite celebrity. You may go looking for an interview where they are talking. Pay close attention to the audio you are listening to and trying to sample. Are there noises in the background, hiss on the soundtrack, a low humm, some quiet music playing or something? The better quality the audio the better the final TTS result. Don't forget, the AI that processes the sounds can hear everything in your sample and it will use them in the voice its trying to recreate.<br><br>
Try make your clip one of nice flowing speech, like the included example files. No big pauses, gaps or other sounds. Preferably a sample that the person you are trying to copy will show a little vocal range and emotion in their voice. Also, try to avoid a clip starting or ending with breathy sounds (breathing in/out etc).<br>
### 🟧 Editing your sample!
So, you've downloaded your favourite celebrity interview off YouTube, from here you need to chop it down to 6 to 30 seconds in length and resample it. If you need to clean it up, do audio processing, volume level changes etc, do this before down-sampling.<br><br>
Using the latest version of Audacity `select/highlight` your 6 to 30 second clip and:<br><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;• `Tracks` > `Resample to 22050Hz`<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;• `Tracks` > `Mix` > `Stereo to Mono`<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;• `File` > `Export Audio` saving it as a `WAV` of `22050Hz`.<br><br>
Save your generated wav file in the `/alltalk_tts/voices/` folder.<br>
### 🟧 Why doesnt it sound like XXX Person?
Maybe you might be interested in trying Finetuning of the XTTS model. Otherwise, the reasons can be that you:<br>
> Didn't down-sample it as above.<br>
> Have a bad quality voice sample.<br>
> Try using the 2x different generation methods `API Local` and `XTTSv2 Local`, as they generate output in slightly different ways.<br>
Additionally, use the RVC pipeline with a matching voice model, however, some samples just never seem to work correctly, so maybe try a different sample. Always remember though, this is an AI model attempting to re-create a voice, so you will never get a 100% match.
""")
gr.Markdown(AllTalkHelpContent.HELP_PAGE, elem_classes="custom-markdown")
with gr.Row():
gr.Markdown(AllTalkHelpContent.HELP_PAGE1, elem_classes="custom-markdown")
gr.Markdown(AllTalkHelpContent.HELP_PAGE2, elem_classes="custom-markdown")
return app
################################