refactor(adapter): 抽出 provider 抽象层(阶段0),controller 不再依赖火山实现

- 新增 adapter/provider:Provider/Capabilities/Request/Credentials/MetricsRecorder/UpstreamError + 注册表
- 火山实现 Provider(provider.go),Synthesis 收敛为私有 synthesize,提供 BuildRequest 过渡映射
- controller 经 provider.Get(name).Synthesize 调用,voice 路由改在 Request 上覆盖
- UpstreamError 上移到 provider 包,火山用类型别名沿用旧名
- setting 新增 GetTTSRequest/GetDefaultFormat/GetDefaultProviderName
- main.go 空导入注册火山
- docs/UPSTREAM_ADAPTER_GUIDE.md 更新为 v1.1(阶段0已落地)
This commit is contained in:
dev
2026-10-11 13:39:09 +08:00
parent ec82e895c3
commit 5c130f0be4
10 changed files with 386 additions and 101 deletions
+2
View File
@@ -10,6 +10,8 @@ import (
"time"
"github.com/volcano-tts/tts-api/controller"
// 空导入注册上游适配器:新增上游只需在此加一行,主干零改动。
_ "github.com/volcano-tts/tts-api/adapter/volcano"
"github.com/volcano-tts/tts-api/installer"
"github.com/volcano-tts/tts-api/metrics"
"github.com/volcano-tts/tts-api/middleware"