設定檔詳解 (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"]