Skip to content

配置文件详解 (config.yaml) ​

OneTTS 的核心行为均通过项目根目录的 config.yaml 集中管理。


📄 完整配置示例 ​

yaml
# API Key (所有接口鉴权密钥)
api_key: sk-onetts-v1-k9L3mX8QZ2sT4vA7wE1rY6u

# TTS 全局切片与缓存配置
TTS-Toolkit:
  cache:
    enable: true
    cache_dir: "data/outputs/cache"
    max_cache_size_mb: 1024

  text_splitter:
    enable: true
    max_chunk_chars: 80
    split_delimiters: "。!?!?;;\n"

# TTS Providers 引擎配置
TTS-Providers:
  edgetts:
    enable: true
    engine: edgetts
    default_voice: "zh-CN-XiaoxiaoNeural"
    voice_aliases:
      alloy: "zh-CN-XiaoxiaoNeural"
      echo: "zh-CN-YunxiNeural"
      fable: "zh-CN-YunjianNeural"
      onyx: "zh-CN-YunyangNeural"
      nova: "zh-CN-XiaoyiNeural"
      shimmer: "zh-CN-liaoning-XiaobeiNeural"

  openai:
    enable: false
    engine: openai
    base_url: "https://api.openai.com/v1"
    api_key: ""
    models: ["tts-1", "tts-1-hd"]

Released under the Apache-2.0 License.