niobures commited on
Commit
5de6a1a
·
verified ·
1 Parent(s): 95f6e0b

OuteTTS (ar, be, bn, zh, nl, en, fr, ka, de, hu, it, ja, ko, lv, lt, fa, pl, pt, ru, es, sw, ta, uk)

Browse files
.gitattributes CHANGED
@@ -33,3 +33,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ tokenizer.json filter=lfs diff=lfs merge=lfs -text
README.md ADDED
@@ -0,0 +1,247 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: cc-by-nc-sa-4.0
3
+ language:
4
+ - en
5
+ - ar
6
+ - zh
7
+ - nl
8
+ - fr
9
+ - de
10
+ - it
11
+ - ja
12
+ - ko
13
+ - lt
14
+ - ru
15
+ - es
16
+ - pt
17
+ - be
18
+ - bn
19
+ - ka
20
+ - hu
21
+ - lv
22
+ - fa
23
+ - pl
24
+ - sw
25
+ - ta
26
+ - uk
27
+ pipeline_tag: text-to-speech
28
+ library_name: outetts
29
+ ---
30
+ <div class="p-4 bg-gray-50 dark:bg-gray-800 rounded-lg shadow-sm mb-12">
31
+ <div class="text-center mb-4">
32
+ <h2 class="text-xl font-light text-gray-900 dark:text-white tracking-tight mt-0 mb-0">Oute A I</h2>
33
+ <div class="flex justify-center gap-6 mt-4">
34
+ <a href="https://www.outeai.com/" target="_blank" class="flex items-center gap-1 text-gray-700 dark:text-gray-300 text-m font-medium hover:text-gray-900 dark:hover:text-white transition-colors underline">
35
+ <svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
36
+ <circle cx="12" cy="12" r="10"></circle>
37
+ <path d="M2 12h20M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z"></path>
38
+ </svg>
39
+ outeai.com
40
+ </a>
41
+ <a href="https://discord.gg/vyBM87kAmf" target="_blank" class="flex items-center gap-1 text-gray-700 dark:text-gray-300 text-m font-medium hover:text-gray-900 dark:hover:text-white transition-colors underline">
42
+ <svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
43
+ <path d="M21 11.5a8.38 8.38 0 0 1-.9 3.8 8.5 8.5 0 0 1-7.6 4.7 8.38 8.38 0 0 1-3.8-.9L3 21l1.9-5.7a8.38 8.38 0 0 1-.9-3.8 8.5 8.5 0 0 1 4.7-7.6 8.38 8.38 0 0 1 3.8-.9h.5a8.48 8.48 0 0 1 8 8v.5z"></path>
44
+ </svg>
45
+ Discord
46
+ </a>
47
+ <a href="https://x.com/OuteAI" target="_blank" class="flex items-center gap-1 text-gray-700 dark:text-gray-300 text-m font-medium hover:text-gray-900 dark:hover:text-white transition-colors underline">
48
+ <svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
49
+ <path d="M23 3a10.9 10.9 0 0 1-3.14 1.53 4.48 4.48 0 0 0-7.86 3v1A10.66 10.66 0 0 1 3 4s-4 9 5 13a11.64 11.64 0 0 1-7 2c9 5 20 0 20-11.5a4.5 4.5 0 0 0-.08-.83A7.72 7.72 0 0 0 23 3z"></path>
50
+ </svg>
51
+ @OuteAI
52
+ </a>
53
+ </div>
54
+ </div>
55
+
56
+ <div class="grid grid-cols-3 sm:grid-cols-3 gap-2">
57
+ <a href="https://huggingface.co/OuteAI/Llama-OuteTTS-1.0-1B" target="_blank" class="bg-white dark:bg-gray-700 text-gray-800 dark:text-gray-100 text-sm font-medium py-2 px-3 rounded-md text-center hover:bg-gray-100 dark:hover:bg-gray-600 hover:border-gray-300 dark:hover:border-gray-500 border border-transparent transition-all">
58
+ Llama OuteTTS 1.0 1B
59
+ </a>
60
+ <a href="https://huggingface.co/OuteAI/Llama-OuteTTS-1.0-1B-GGUF" target="_blank" class="bg-white dark:bg-gray-700 text-gray-800 dark:text-gray-100 text-sm font-medium py-2 px-3 rounded-md text-center hover:bg-gray-100 dark:hover:bg-gray-600 hover:border-gray-300 dark:hover:border-gray-500 border border-transparent transition-all">
61
+ Llama OuteTTS 1.0 1B GGUF
62
+ </a>
63
+ <a href="https://github.com/edwko/OuteTTS" target="_blank" class="bg-white dark:bg-gray-700 text-gray-800 dark:text-gray-100 text-sm font-medium py-2 px-3 rounded-md text-center hover:bg-gray-100 dark:hover:bg-gray-600 hover:border-gray-300 dark:hover:border-gray-500 border border-transparent transition-all">
64
+ GitHub Library
65
+ </a>
66
+ </div>
67
+ </div>
68
+
69
+ > [!IMPORTANT]
70
+ > **Important Sampling Considerations**
71
+ >
72
+ > When using OuteTTS version 1.0, it is crucial to use the settings specified in the [Sampling Configuration](#sampling-configuration) section.
73
+ > The **repetition penalty implementation** is particularly important - this model requires penalization applied to a **64-token recent window**,
74
+ > rather than across the entire context window. Penalizing the entire context will cause the model to produce **broken or low-quality output**.
75
+ >
76
+ > To address this limitation, all necessary samplers and patches for all backends are set up automatically in the **outetts** library.
77
+ > If using a custom implementation, ensure you correctly implement these requirements.
78
+
79
+ # OuteTTS Version 1.0
80
+
81
+ This update brings significant improvements in speech synthesis and voice cloning—delivering a more powerful, accurate, and user-friendly experience in a compact size.
82
+
83
+ ## What's New
84
+
85
+ ### 1. Prompt Revamp & Dependency Removal
86
+ - **Automatic Word Alignment:** The model now performs word alignment internally. Simply input raw text—no pre-processing required—and the model handles the rest, streamlining your workflow. For optimal results, use normalized, readable text without newlines (light normalization is applied automatically in outetts library).
87
+ - **Native Multilingual Text Support:** Direct support for native text across multiple languages eliminates the need for romanization.
88
+ - **Enhanced Metadata Integration:** The updated prompt system incorporates additional metadata (time, energy, spectral centroid, pitch) at both global and word levels, improving speaker flow and synthesis quality.
89
+ - **Special Tokens for Audio Codebooks:** New tokens for c1 (codebook 1) and c2 (codebook 2).
90
+
91
+ ### 2. New Audio Encoder Model
92
+ - **DAC Encoder:** Integrates a DAC audio encoder from [ibm-research/DAC.speech.v1.0](https://huggingface.co/ibm-research/DAC.speech.v1.0), utilizing two codebooks for high quality audio reconstruction.
93
+ - **Performance Trade-off:** Improved audio fidelity increases the token generation rate from 75 to 150 tokens per second. This trade-off prioritizes quality, especially for multilingual applications.
94
+
95
+ ### 3. Voice Cloning
96
+ - **One-Shot Voice Cloning:** To achieve one-shot cloning, the model typically requires only around **10 seconds** of reference audio to produce an accurate voice representation.
97
+ - **Improved Accuracy:** Enhanced by the new encoder and additional training metadata, voice cloning is now more natural and precise.
98
+
99
+ ### 4. Auto Text Alignment & Numerical Support
100
+ - **Automatic Text Alignment:** Aligns raw text at the word level, even for languages without clear boundaries (e.g., Japanese, Chinese), using insights from pre-processed training data.
101
+ - **Direct Numerical Input:** Built-in multilingual numerical support allows direct use of numbers in prompts—no textual conversion needed. (The model typically chooses the dominant language present. Mixing languages in a single prompt may lead to mistakes.)
102
+
103
+ ### 5. Multilingual Capabilities
104
+
105
+ - **Supported Languages:** OuteTTS offers varying proficiency levels across languages, based on training data exposure.
106
+
107
+ - **High Training Data Languages:** These languages feature extensive training: **English, Arabic, Chinese, Dutch, French, German, Italian, Japanese, Korean, Lithuanian, Russian, Spanish**
108
+
109
+ - **Moderate Training Data Languages:** These languages received moderate training, offering good performance with occasional limitations: **Portuguese, Belarusian, Bengali, Georgian, Hungarian, Latvian, Persian/Farsi, Polish, Swahili, Tamil, Ukrainian**
110
+
111
+ - **Beyond Supported Languages:** The model can generate speech in untrained languages with varying success. Experiment with unlisted languages, though results may not be optimal.
112
+
113
+ ## Video Showcase
114
+
115
+ <video width="1280" height="720" controls style="box-shadow: 0px 0px 20px 10px rgba(0, 0, 0, 0.05), 0px 1px 3px 10px rgba(255, 255, 255, 0.05);">
116
+ <source src="https://huggingface.co/OuteAI/Llama-OuteTTS-1.0-1B-GGUF/resolve/main/media/showcase.mp4" type="video/mp4">
117
+ Your browser does not support the video tag.
118
+ </video>
119
+
120
+ ## Quick Start Guide
121
+
122
+ Getting started with **OuteTTS** is simple:
123
+
124
+ ### Installation
125
+
126
+ 🔗 [Installation instructions](https://github.com/edwko/OuteTTS?tab=readme-ov-file#installation)
127
+
128
+ ### Basic Usage
129
+ ```python
130
+ import outetts
131
+
132
+ # Initialize the interface
133
+ interface = outetts.Interface(
134
+ config=outetts.ModelConfig.auto_config(
135
+ model=outetts.Models.VERSION_1_0_SIZE_1B,
136
+ # For llama.cpp backend
137
+ backend=outetts.Backend.LLAMACPP,
138
+ quantization=outetts.LlamaCppQuantization.FP16
139
+ # For transformers backend
140
+ # backend=outetts.Backend.HF,
141
+ )
142
+ )
143
+
144
+ # Load the default speaker profile
145
+ speaker = interface.load_default_speaker("EN-FEMALE-1-NEUTRAL")
146
+
147
+ # Or create your own speaker profiles in seconds and reuse them instantly
148
+ # speaker = interface.create_speaker("path/to/audio.wav")
149
+ # interface.save_speaker(speaker, "speaker.json")
150
+ # speaker = interface.load_speaker("speaker.json")
151
+
152
+ # Generate speech
153
+ output = interface.generate(
154
+ config=outetts.GenerationConfig(
155
+ text="Hello, how are you doing?",
156
+ generation_type=outetts.GenerationType.CHUNKED,
157
+ speaker=speaker,
158
+ sampler_config=outetts.SamplerConfig(
159
+ temperature=0.4
160
+ ),
161
+ )
162
+ )
163
+
164
+ # Save to file
165
+ output.save("output.wav")
166
+ ```
167
+
168
+ ### More Configuration Options
169
+ For advanced settings and customization, visit the official repository:
170
+ 🔗 [interface_usage.md](https://github.com/edwko/OuteTTS/blob/main/docs/interface_usage.md)
171
+
172
+ ## Usage Recommendations
173
+
174
+ ### Speaker Reference
175
+ The model is designed to be used with a speaker reference. Without one, it generates random vocal characteristics, often leading to lower-quality outputs.
176
+ The model inherits the referenced speaker's emotion, style, and accent.
177
+ When transcribing to other languages with the same speaker, you may observe the model retaining the original accent.
178
+
179
+ ### Multilingual Application
180
+ It is recommended to create a speaker profile in the language you intend to use. This helps achieve the best results in that specific language, including tone, accent, and linguistic features.
181
+
182
+ While the model supports cross-lingual speech, it still relies on the reference speaker. If the speaker has a distinct accent—such as British English—other languages may carry that accent as well.
183
+
184
+ ### Optimal Audio Length
185
+ - **Best Performance:** Generate audio around **42 seconds** in a single run (approximately 8,192 tokens). It is recomended not to near the limits of this windows when generating. Usually, the best results are up to 7,000 tokens.
186
+ - **Context Reduction with Speaker Reference:** If the speaker reference is 10 seconds long, the effective context is reduced to approximately 32 seconds.
187
+
188
+ ### Temperature Setting Recommendations
189
+ Testing shows that a temperature of **0.4** is an ideal starting point for accuracy (with the sampling settings below). However, some voice references may benefit from higher temperatures for enhanced expressiveness or slightly lower temperatures for more precise voice replication.
190
+
191
+ ### Verifying Speaker Encoding
192
+ If the cloned voice quality is subpar, check the encoded speaker sample.
193
+
194
+ ```python
195
+ interface.decode_and_save_speaker(speaker=your_speaker, path="speaker.wav")
196
+ ```
197
+
198
+ The DAC audio reconstruction model is lossy, and samples with clipping, excessive loudness, or unusual vocal features may introduce encoding issues that impact output quality.
199
+
200
+ ### Sampling Configuration
201
+ For optimal results with this TTS model, use the following sampling settings.
202
+
203
+ | Parameter | Value |
204
+ |-------------------|----------|
205
+ | Temperature | 0.4 |
206
+ | Repetition Penalty| 1.1 |
207
+ | **Repetition Range** | **64** |
208
+ | Top-k | 40 |
209
+ | Top-p | 0.9 |
210
+ | Min-p | 0.05 |
211
+
212
+ ## Model Specifications
213
+
214
+ - **Training Data:** Trained on **~60k hours of audio**
215
+ - **Context Length:** Supports a maximum context window of **8,192 tokens**
216
+
217
+ ### Training Parameters
218
+
219
+ #### **Pre-Training**
220
+ - **Optimizer:** AdamW
221
+ - **Batch Size:** 1 million tokens
222
+ - **Max Learning Rate:** 3e-4
223
+ - **Min Learning Rate:** 3e-5
224
+ - **Context Length:** 8192
225
+
226
+ #### **Fine-Tuning**
227
+ - **Optimizer:** AdamW
228
+ - **Max Learning Rate:** 1e-5
229
+ - **Min Learning Rate:** 5e-6
230
+ - **Data:** 10,000 diverse, high-quality examples
231
+
232
+ ## License Information
233
+
234
+ - **Initial Llama3.2 Components:** [Llama 3.2 Community License Agreement ](https://huggingface.co/meta-llama/Llama-3.2-1B/blob/main/LICENSE.txt)
235
+ - **Our Continued Pre-Training, Fine-Tuning, and Additional Components:** [CC-BY-NC-SA-4.0](https://creativecommons.org/licenses/by-nc-sa/4.0/)
236
+
237
+ ## Acknowledgments
238
+
239
+ - Big thanks to **Hugging Face** for their continued resource support through their grant program!
240
+ - Audio encoding and decoding utilize [ibm-research/DAC.speech.v1.0](https://huggingface.co/ibm-research/DAC.speech.v1.0)
241
+ - OuteTTS is built with [Llama3.2-1B](https://huggingface.co/meta-llama/Llama-3.2-1B) as the base model, with continued pre-training and fine-tuning.
242
+
243
+ ### Ethical Use Guidelines
244
+ This text-to-speech model is intended for legitimate applications that enhance accessibility, creativity, and communication;
245
+ prohibited uses include impersonation without consent, creation of deliberately misleading content,
246
+ generation of harmful or harassing material, distribution of synthetic audio without proper disclosure,
247
+ voice cloning without permission, and any uses that violate applicable laws, regulations, or copyrights.
config.json ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "LlamaForCausalLM"
4
+ ],
5
+ "attention_bias": false,
6
+ "attention_dropout": 0.0,
7
+ "bos_token_id": 133309,
8
+ "eos_token_id": 133310,
9
+ "head_dim": 64,
10
+ "hidden_act": "silu",
11
+ "hidden_size": 2048,
12
+ "initializer_range": 0.02,
13
+ "intermediate_size": 8192,
14
+ "max_position_embeddings": 131072,
15
+ "mlp_bias": false,
16
+ "model_type": "llama",
17
+ "num_attention_heads": 32,
18
+ "num_hidden_layers": 16,
19
+ "num_key_value_heads": 8,
20
+ "pretraining_tp": 1,
21
+ "rms_norm_eps": 1e-05,
22
+ "rope_scaling": {
23
+ "factor": 32.0,
24
+ "high_freq_factor": 4.0,
25
+ "low_freq_factor": 1.0,
26
+ "original_max_position_embeddings": 8192,
27
+ "rope_type": "llama3"
28
+ },
29
+ "rope_theta": 500000.0,
30
+ "tie_word_embeddings": true,
31
+ "torch_dtype": "bfloat16",
32
+ "transformers_version": "4.48.3",
33
+ "use_cache": true,
34
+ "vocab_size": 134400
35
+ }
generation_config.json ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_from_model_config": true,
3
+ "bos_token_id": 133309,
4
+ "eos_token_id": 133310,
5
+ "pad_token_id": 128001,
6
+ "transformers_version": "4.48.3",
7
+ "do_sample": true,
8
+ "temperature": 0.4,
9
+ "repetition_penalty": 1.1,
10
+ "top_k": 40,
11
+ "top_p": 0.9,
12
+ "min_p": 0.05
13
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:03543805868adcbc81a2259177d626f557cfa8be6fa19480a47ba30a920b8003
3
+ size 2496811440
source.txt ADDED
@@ -0,0 +1 @@
 
 
1
+ https://huggingface.co/OuteAI/Llama-OuteTTS-1.0-1B
special_tokens_map.json ADDED
The diff for this file is too large to render. See raw diff
 
tokenizer.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ec54a55e3c6fc7318ea02cbd1a6eb1fb180bff1b58acbf068504a25f1b407b7b
3
+ size 18366636
tokenizer_config.json ADDED
The diff for this file is too large to render. See raw diff