#239·KrillinAI

voice code没有正确被带入

Author: PhantasWengCreated May 28, 2025Updated May 27, 2026
Labelsbug

在使用 Docker 时,若使用 openai 当 tts provider ,会遇到以下错误

log
krillin-1  | 2025-05-28T06:36:03.995Z	error	openai/openai.go:93	openai tts failed	{"status_code": 400, "body": "{\n  \"error\": {\n    \"message\": \"[{'type': 'enum', 'loc': ('body', 'voice'), 'msg': \\\"Input should be 'nova', 'shimmer', 'echo', 'onyx', 'fable', 'alloy', 'ash', 'sage' or 'coral'\\\", 'input': '', 'ctx': {'expected': \\\"'nova', 'shimmer', 'echo', 'onyx', 'fable', 'alloy', 'ash', 'sage' or 'coral'\\\"}}]\",\n    \"type\": \"invalid_request_error\",\n    \"param\": null,\n    \"code\": null\n  }\n}"}

实际上有填写 voice code 但不会正确被带入

Image

这是我的 config 片段

toml
[tts.openai]
        base_url = "https://api.openai.com/v1"
        api_key = "MY API KEY"
        model = "gpt-4o-mini-tts" # gpt-4o-mini-tts、tts-1、tts-1-hd