快速测试
这里直接调用现有接口。测试失败时会显示 HTTP 状态和错误详情,方便判断是网关、鉴权还是上游模型服务的问题。
功能和调用链接
| Method | Path | 用途 | 鉴权 |
|---|---|---|---|
| GET | / | Open this dashboard page. | No |
| GET | /health | Health check. | No |
| GET | /dashboard.json | Machine-readable dashboard metadata. | No |
| GET | /v1/models | List configured models/backends. | Yes if API keys are configured |
| GET | /v1/voices | List voices, optionally filtered by ?model=chattts. | Yes if API keys are configured |
| POST | /v1/audio/speech | Text to speech. OpenAI-style JSON body. | Yes if API keys are configured |
| POST | /v1/audio/transcriptions | Speech to text. OpenAI-style multipart upload. | Yes if API keys are configured |
Swagger 文档:http://127.0.0.1:8010/docs。外部调用时端口取决于你的内网穿透映射。
后端模型状态
| Backend | Status | Upstream | Model Path | Aliases |
|---|---|---|---|---|
Qwen3-TTS-12Hz-1.7B-CustomVoiceqwen_tts | needs_base_url openai_speech_proxy | Not configured | C:\01.Jiaobinshi\05.AI\Models\Qwen3\Qwen3-TTS-12Hz-1.7B-CustomVoice | qwen-tts, qwen3-tts-1.7b-customvoice |
Qwen3-ASR-1.7Bqwen_asr | enabled openai_transcription_proxy | http://127.0.0.1:8020/v1/audio/transcriptions | C:\01.Jiaobinshi\05.AI\Models\Qwen3\Qwen3-ASR-1.7B | qwen-asr, qwen3-asr-1.7b |
GPT-SoVITS v2Progpt_sovits | enabled gpt_sovits | http://127.0.0.1:9880/tts | C:\01.Jiaobinshi\05.AI\Project\GPT-SoVITS-v2pro-20250604 | gpt-sovits, sovits |
ChatTTS UIchattts | enabled chattts | http://127.0.0.1:9966/tts | C:\01.Jiaobinshi\05.AI\Project\win-ChatTTS-ui-v1.0 | chat-tts |
faster-whisperfaster_whisper | disabled faster_whisper | Not configured | large-v3 | whisper, faster-whisper |
Qwen TTS/ASR 当前是 sidecar 模式;如果显示 needs_base_url,需要先启动兼容服务并在 config/gateway.json 填入 base_url。
可用音色
| Backend | Voices |
|---|---|
qwen_tts | AidenDylanEricOno_annaRyanSerenaSoheeUncle_fuVivian |
gpt_sovits | reference |
chattts | 22227869665340995099 |
调用示例
PowerShell TTS
Invoke-WebRequest -Uri http://127.0.0.1:8010/v1/audio/speech -Method POST -ContentType "application/json" -Body '{"model":"chattts","input":"你好,这是本地语音网关测试。","voice":"2222","response_format":"wav"}' -OutFile speech.wavcurl TTS
curl.exe -X POST http://127.0.0.1:8010/v1/audio/speech -H "Content-Type: application/json" -d "{\"model\":\"chattts\",\"input\":\"你好,这是本地语音网关测试。\",\"voice\":\"2222\",\"response_format\":\"wav\"}" -o speech.wavJSON body
{
"model": "chattts",
"input": "你好,这是本地语音网关测试。",
"voice": "2222",
"response_format": "mp3"
}curl STT
curl.exe -X POST http://127.0.0.1:8010/v1/audio/transcriptions -F "model=qwen_asr" -F "file=@C:\path\audio.wav" -F "response_format=json"
启动命令
| 网关服务 | scripts\run_gateway.cmd |
| GPT-SoVITS API | scripts\start_gpt_sovits_api.ps1 |
| ChatTTS | scripts\start_chattts.ps1 |
| Qwen-ASR | scripts\start_qwen_asr_api.ps1 |
| 资源诊断 | scripts\diagnose_resources.ps1 |
本机资源路径
| Name | Path |
|---|---|
| models_root | C:\01.Jiaobinshi\05.AI\Models |
| gguf_root | C:\01.Jiaobinshi\05.AI\Models_GGUF |
| gpt_sovits_root | C:\01.Jiaobinshi\05.AI\Project\GPT-SoVITS-v2pro-20250604 |
| chattts_root | C:\01.Jiaobinshi\05.AI\Project\win-ChatTTS-ui-v1.0 |
| comfyui_aki_root | C:\01.Jiaobinshi\05.AI\Project\ComfyUI-aki-v3 |
| sd_webui_aki_root | C:\01.Jiaobinshi\05.AI\Project\sd-webui-aki\sd-webui-aki-v4.10 |