OuteTTS

edwkoApache-2.0更新放缓

OuteTTS 模型的推理接口,支持 GGUF 和 Transformers 后端,方便本地跑文本转语音。

Interface for OuteTTS models.

0.4.2发布于 2025-05-19 08:51 UTC1,440star118fork同步于 2026-11-07 07:31 UTC

怎么上手

由 README 提炼,执行前请确认
pip install outetts --upgrade
CMAKE_ARGS="-DGGML_CUDA=on" pip install outetts --upgrade
硬件要求按 README 说明

README 未给出显存要求;llama.cpp 后端可按 CPU、NVIDIA CUDA、AMD ROCm/HIP、Vulkan、Apple Metal 分别编译安装,基准测试在 NVIDIA L40S 上完成。

支持 Apple Silicon需要 CUDA支持 ROCm / AMD
下载:源码 zip·GitHub Releases(安装包)本站不镜像安装包

项目说明

由 README 自动翻译提炼

OuteTTS 是 OuteTTS 系列语音合成模型的统一调用接口,支持多种推理后端和声音克隆

OuteTTS 模型的推理接口,支持 GGUF 和 Transformers 后端,方便本地跑文本转语音。

核心能力

  • 统一封装 llama.cpp、Transformers、ExLlamaV2、VLLM 等多种推理后端
  • 用几行代码从 wav 音频创建并保存可复用的说话人配置
  • 自动配置 64 token 重复惩罚窗口等采样参数,避免输出劣化
  • 支持批量推理,README 给出 L40S 上的 RTF 基准
  • 提供 Python 包和 npm 包,另有 Transformers.js 的 JS 支持

容易踩的坑

默认安装的是 llama.cpp CPU 版,要用 GPU 需在 pip install 时通过 CMAKE_ARGS 指定对应后端重新编译;ExLlamaV2 和 VLLM 后端需手动安装,VLLM 仍为实验性支持;模型需从 Hugging Face 下载,且目前只有默认英文女声,自定义音色需自行创建 speaker profile。

内容由模型根据 README 生成,可能不完整或不准确,以官方文档为准。看原文 README

最近发版

5 个版本0.4.2
  1. 0.4.2最新正式版2025-05-19 · 2025-05-19 08:51 UTC

    OuteTTS v0.4.2

    • Fade-in / Fade-out Audio Decoding Introduced quick fade-in and fade-out on decoded audio chunks to eliminate clipping artifacts at segment boundaries.

    • Batched Decoding Interfaces Added support for high-throughput, batched inference via three new backends:

      • EXL2 Async: Asynchronous batch processing using the EXL2.
      • VLLM: Asynchronous batch decoding with VLLM. (Experiment support)
      • llama.cpp Async Server Endpoint: Connects to a continuously-batched llama.cpp server for async inference.
    • Single-Stream Decoding

      • llama.cpp Server Endpoint: single-stream decode endpoint for llama.cpp server.
    • OuteTTS 1.0 0.6B Model Support Compatibility with the new OuteTTS-1.0-0.6B, including config defaults.

    • Batched Interface Parameters New configuration options to control batched interface.

    • Enhanced pre-prompt normalization pipeline.

    • Documentation Updates, expanded the batched interface usage.

  2. 0.4.0OuteTTS Lib v0.42025-04-07 · 2025-04-07 09:29 UTC
    查看更新说明

    OuteTTS Lib v0.4 Release Notes

    Interface Improvements

    • Consolidated all interface versions into a single interface.py file for centralized management
    • Implemented isolated model handling in separate version folders while maintaining core functionality for cross-compatibility
    • Added Interface Version 3 implementation to support OuteTTS v1.0 models

    New Features

    • Smart text chunking for generating long audio clips from large text inputs
    • Added DAC interface code to handle OuteTTS 1.0 audio encoding and decoding
    • Added metadata for interface version compatibility in speaker files

    Transformers Backend Patch for OuteTTS 1.0

    • Implemented windowed repetition penalty processor (RepetitionPenaltyLogitsProcessorPatch) for improved text generation quality
    • Applies penalties only to recent tokens (64-token window) rather than full context
    • Addresses key quality issues in speech synthesis applications
    • Maintains backward compatibility with standard HuggingFace interfaces

    Streamlined Usage

    Simplified code usage with a more modular and compact implementation:

    output = interface.generate(
        config=outetts.GenerationConfig(
            text="Hello, how are you doing?",
            generation_type=outetts.GenerationType.CHUNKED,
            speaker=speaker,
            sampler_config=outetts.SamplerConfig(
                temperature=0.4
                # Additional sampler parameters
            ),
        )
    )
    

    Automatic Configuration

    Added support for automatic config and model loading for v1.0 models:

    # Auto-configuration approach
    interface = outetts.Interface(
        config=outetts.ModelConfig.auto_config(
            model=outetts.Models.VERSION_1_0_SIZE_1B,
            backend=outetts.Backend.LLAMACPP,
            quantization=outetts.LlamaCppQuantization.FP16
        )
    )
    

    Manual configuration remains available:

    # Manual configuration approach
    interface = outetts.Interface(
        config=outetts.ModelConfig(
            model_path="...",
            tokenizer_path="...",
            backend=outetts.Backend.LLAMACPP,
            interface_version=outetts.InterfaceVersion.V3
        )
    )
    

    Performance and Dependencies

    • Improved loading times by dynamically loading only required components
    • Removed unused dependencies (further optimizations pending, particularly for WavTokenizer implementation)

    Documentation

    Full usage documentation is available at: 🔗 interface_usage.md

  3. 0.3.2OuteTTS v0.3.22025-01-17 · 2025-01-17 15:20 UTC
    查看更新说明

    Update 0.3

    • Implement v2 interface with simplified structure.
    • Split documentation for interface v1 and interface v2.
    • Add compatibility for OuteTTS-0.3 1B and 500M models.
    • Restructure codebase for better maintainability.
  4. 0.2.3OuteTTS v0.2.32024-12-14 · 2024-12-14 10:58 UTC
    查看更新说明

    Release Notes v0.2.3

    • Split WavTokenizer into encoder (82MB) and decoder (248MB) components
    • [WIP] Streaming support
  5. 0.2.1OuteTTS v0.2.12024-11-30 · 2024-11-30 14:55 UTC
    查看更新说明

    Release Notes v0.2.1

    New Features and Improvements:
    1. Support for ExLlamaV2

      • Integrated support for ExLlamaV2
      • Pull request: #37
    2. Whisper Integration for Speaker Generation

      • Added Whisper-based transcription for generating speakers when no transcript is provided.
      • Suggested in: #28
      • Now, if transcript is set to None, the text will be automatically transcribed using Whisper.
      def create_speaker(
          self, 
          audio_path: str, 
          transcript: str = None, 
          whisper_model: str = "turbo",
          whisper_device = None
      )
      

用户点评

登录用户的真实使用记录,可按版本和硬件筛选
共 0 条

    还没有人点评。第一个说出真实体验的人最有价值。

    README 原文

    未翻译

    OuteTTS

    🌐 Website (outeai.com) | 🤗 Hugging Face | 💬 Discord | 𝕏 X (Twitter) | 📰 Blog

    HuggingFace HuggingFace PyPI npm

    Compatibility

    OuteTTS supports the following backends:
    BackendLanguageInstallationModel Version Support
    Llama.cpp Python BindingsPython✅ Installed by defaultAll
    Llama.cpp ServerPython✅ Installed by defaultAll
    Llama.cpp Server Async (Batched)Python✅ Installed by default1.0
    Hugging Face TransformersPython✅ Installed by defaultAll
    ExLlamaV2Python❌ Requires manual installationAll
    ExLlamaV2 Async (Batched)Python❌ Requires manual installation1.0
    VLLM (Batched) Experimental supportPython❌ Requires manual installation1.0
    Transformers.jsJavaScriptNPM package0.2

    ⚡ Batched RTF Benchmarks

    Tested with NVIDIA L40S GPU

    rtf

    Installation

    OuteTTS Installation Guide

    OuteTTS now installs the llama.cpp Python bindings by default. Therefore, you must specify the installation based on your hardware. For more detailed instructions on building llama.cpp, refer to the following resources: llama.cpp Build and llama.cpp Python

    Pip:

    pip install outetts --upgrade
    
    CMAKE_ARGS="-DGGML_CUDA=on" pip install outetts --upgrade
    
    CMAKE_ARGS="-DGGML_HIPBLAS=on" pip install outetts --upgrade
    
    CMAKE_ARGS="-DGGML_VULKAN=on" pip install outetts --upgrade
    
    CMAKE_ARGS="-DGGML_METAL=on" pip install outetts --upgrade
    

    Usage

    📚 Documentation

    For a complete usage guide, refer to the interface documentation here:

    Documentation

    Basic Usage

    [!TIP] Currently, only one default English voice is available for testing.

    You can easily create your own speaker profiles in just a few lines by following this guide:

    👉 Creating Custom Speaker Profiles

    import outetts
    
    # Initialize the interface
    interface = outetts.Interface(
        config=outetts.ModelConfig.auto_config(
            model=outetts.Models.VERSION_1_0_SIZE_1B,
            # For llama.cpp backend
            backend=outetts.Backend.LLAMACPP,
            quantization=outetts.LlamaCppQuantization.FP16
            # For transformers backend
            # backend=outetts.Backend.HF,
        )
    )
    
    # Load the default speaker profile
    speaker = interface.load_default_speaker("EN-FEMALE-1-NEUTRAL")
    
    # Or create your own speaker profiles in seconds and reuse them instantly
    # speaker = interface.create_speaker("path/to/audio.wav")
    # interface.save_speaker(speaker, "speaker.json")
    # speaker = interface.load_speaker("speaker.json")
    
    # Generate speech
    output = interface.generate(
        config=outetts.GenerationConfig(
            text="Hello, how are you doing?",
            speaker=speaker,
        )
    )
    
    # Save to file
    output.save("output.wav")
    

    External Libraries with OuteTTS Model Support

    These are third-party tools that support running the OuteTTS model.

    LibraryLanguageModel Version Support
    Llama.cpp TTS ExampleC++0.2
    KoboldCPPC++0.2, 0.3
    MLX-AudioPython (MLX)1.0
    ChatLLM.cppC++1.0

    Usage Recommendations for OuteTTS version 1.0

    [!IMPORTANT] Important Sampling Considerations

    When using OuteTTS version 1.0, it is crucial to use the settings specified in the Sampling Configuration section. The repetition penalty implementation is particularly important - this model requires penalization applied to a 64-token recent window, rather than across the entire context window. Penalizing the entire context will cause the model to produce broken or low-quality output.

    To address this limitation, all necessary samplers and patches for all backends are set up automatically in the outetts library. If using a custom implementation, ensure you correctly implement these requirements.

    Speaker Reference

    The model is designed to be used with a speaker reference. Without one, it generates random vocal characteristics, often leading to lower-quality outputs. The model inherits the referenced speaker's emotion, style, and accent. Therefore, when transcribing to other languages with the same speaker, you may observe the model retaining the original accent. For example, if you use a Japanese speaker and continue speech in English, the model may tend to use a Japanese accent.

    Multilingual Application

    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.

    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.

    Optimal Audio Length

    • 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.
    • Context Reduction with Speaker Reference: If the speaker reference is 10 seconds long, the effective context is reduced to approximately 32 seconds.

    Temperature Setting Recommendations

    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.

    Verifying Speaker Encoding

    If the cloned voice quality is subpar, check the encoded speaker sample.

    interface.decode_and_save_speaker(speaker=your_speaker, path="speaker.wav")
    

    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.

    Sampling Configuration

    For optimal results with this TTS model, use the following sampling settings.

    ParameterValue
    Temperature0.4
    Repetition Penalty1.1
    Repetition Range64
    Top-k40
    Top-p0.9
    Min-p0.05

    Acknowledgments

    DAC (Descript Audio Codec)

    WavTokenizer

    CTC Forced Alignment

    Uroman "This project uses the universal romanizer software 'uroman' written by Ulf Hermjakob, USC Information Sciences Institute (2015-2020)"

    mecab-python3