> ## Content Index
> Fetch the complete content index at: https://www.hubwiz.com/blog/llms.txt
> Use this file to discover other available public pages before exploring further.

# OuteTTS 简明教程
- URL: https://www.hubwiz.com/blog/outetts-concise-tutorial/
- Published: 2024-11-08T12:16:59.000Z
- Updated: 2024-11-08T12:16:59.000Z
- Description: OuteAI推出的OuteTTS是一种新颖的文本转语音 ( TTS ) 合成方法，它利用纯语言建模，无需外部适配器或复杂架构。
- Author: admin
- Tags: MODEL-ZOO, TTS, OUTETTS, WAVTOKENIZER, LLAMA, GGUF, #Import 2026-10-14 14:41

OuteAI推出了[ OuteTTS](https://github.com/edwko/OuteTTS?ref=hubwiz.com)，这是一种新颖的文本转语音合成方法，它利用纯语言建模，无需外部适配器或复杂架构。OuteTTS的 350M 参数模型表明，通过使用精心设计的提示和音频词元（token）的简单方法，可以实现高质量的语音合成。

文本转语音（text-to-speech）合成传统上依赖于复杂的架构和专门的模型。借助 OuteTTS，我们证明了一个相对较小的语言模型可以通过一种简单而有效的方法学习生成高质量的语音。我们的模型只有 3.5 亿个参数，展示了直接使用语言模型进行语音合成的潜力。

## 1、OuteTTS简介

OuteTTS模型建立在 LLaMa 架构之上，利用了 Oute3-350M-DEV 基础模型，该模型已在 300 亿个 DCLM-baseline-1.0 词元上进行了预训练。 OuteTTS 的独特之处在于其音频处理的三步方法：

- 使用 WavTokenizer 进行音频标记化（每秒处理 75 个标记）
- CTC 强制对齐以创建精确的单词到音频标记映射
- 按照以下格式创建结构化提示：

```
[full transcription]
[word] [duration token] [audio tokens]
```

### 1.1 训练进展

在训练过程中，我们观察到了不同的改进阶段：

- 1 亿个词元：该模型开始发展出基本的说话者音调和初始发声尝试
- 5 亿个词元：单词可理解性和句子结构明显改善
- 10亿个词元：单词知识和整体清晰度显著增强

### 1.2 主要特点

[OuteTTS-0.1-350M ](https://huggingface.co/OuteAI/OuteTTS-0.1-350M?ref=hubwiz.com)提供了几个值得注意的功能：

- 纯语言建模方法 TTS
- 语音克隆功能
- LLaMa 架构
- 兼容 llama.cpp 和 GGUF 格式。点击[这里](https://huggingface.co/OuteAI/OuteTTS-0.1-350M-GGUF?ref=hubwiz.com)访问GGUF模型。

### 1.3 已知限制

作为实验性的 v0.1版本中，OuteTTS 有几个已知的限制：

- 由于训练数据限制而导致的词汇约束
- 仅支持字符串输入
- 由于紧凑的 350M 参数大小，可能会更改或插入单词
- 根据用例而变化的温度敏感度

> 实施注意事项：虽然该模型擅长处理较短的句子，但我们建议将较长的文本拆分为较小的段以获得最佳性能。温度设置可能需要根据特定用例进行调整。

### 1.4 语音样本

| 输入文本                                                                            | 输出音频                                                                                           | 参数备注                                             |
| ------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ------------------------------------------------ |
| Hello, I can speak pretty well, but sometimes I make some mistakes.             | [链接](https://huggingface.co/OuteAI/OuteTTS-0.1-350M/resolve/main/samples/2.wav?ref=hubwiz.com) | 温度=0.1, 重复惩罚=1.1                                 |
| Hello, I can speak pretty well, but sometimes I make some mistakes.             | [链接](https://huggingface.co/OuteAI/OuteTTS-0.1-350M/resolve/main/samples/1.wav?ref=hubwiz.com) | 温度=0.1, 重复惩罚=1.1                                 |
| Scientists have discovered a new planet that may be capable of supporting life! | [链接](https://huggingface.co/OuteAI/OuteTTS-0.1-350M/resolve/main/samples/6.wav?ref=hubwiz.com) | 使用 Q4\_K\_M 量化模型. 温度=0.7, 重复惩罚=1.1               |
| Scientists have discovered a new planet that may be capable of supporting life! | [链接](https://huggingface.co/OuteAI/OuteTTS-0.1-350M/resolve/main/samples/4.wav?ref=hubwiz.com) | 模型会部分修改输入文本. 温度=0.1, 重复惩罚=1.1                    |
| Scientists have discovered a new planet that may be capable of supporting life! | [链接](https://huggingface.co/OuteAI/OuteTTS-0.1-350M/resolve/main/samples/5.wav?ref=hubwiz.com) | 这种情况下，调高温度从0.1 到0.7 可以生成更一致的输出. 温度=0.7, 重复惩罚=1.1 |

## 2、OuteTTS快速上手

开始使用 OuteTTS 非常简单。首先安装outetts库：

```
pip install outetts
```

### 2.1 生成无特定说话人的语音

```
from outetts.v0_1.interface import InterfaceHF, InterfaceGGUF

# Initialize the interface with the Hugging Face model
interface = InterfaceHF("OuteAI/OuteTTS-0.1-350M")

# Or initialize the interface with a GGUF model
# interface = InterfaceGGUF("path/to/model.gguf")

# Generate TTS output
# Without a speaker reference, the model generates speech with random speaker characteristics
output = interface.generate(
    text="Hello, am I working?",
    temperature=0.1,
    repetition_penalty=1.1,
    max_lenght=4096
)

# Play the generated audio
output.play()

# Save the generated audio to a file
output.save("output.wav")
```

### 2.2 语音克隆功能

```
# Create a custom speaker from an audio file
speaker = interface.create_speaker(
    "path/to/reference.wav",
    "reference text matching the audio"
)

# Generate TTS with the custom voice
output = interface.generate(
    text="This is a cloned voice speaking",
    speaker=speaker,
    temperature=0.1,
    repetition_penalty=1.1,
    max_lenght=4096
)
```

## 3、结束语

OuteTTS-0.1-350M 代表了简化文本到语音合成的进步。通过证明通过纯语言建模方法可以实现高质量的语音生成。

未来方向如下：

- 增加模型参数和扩展训练数据
- 研究替代对齐方法以提高字符兼容性
- 探索语音到语音助手模型中的潜在应用

---

原文链接：[OuteTTS-0.1-350M | OuteAI](https://www.outeai.com/blog/outetts-0.1-350m?ref=hubwiz.com)

汇智网翻译整理，转载请标明出处