feat: add style selection for TTS and update related functionality

This commit is contained in:
王锦强
2025-03-09 17:21:52 +08:00
parent 4ec09304f6
commit 1cd2ac1624
5 changed files with 70 additions and 7 deletions

View File

@@ -153,6 +153,7 @@ func (h *TTSHandler) HandleTTS(w http.ResponseWriter, r *http.Request) {
Voice: q.Get("v"),
Rate: q.Get("r"),
Pitch: q.Get("p"),
Style: q.Get("s"),
}
case http.MethodPost:
// 从POST JSON体获取
@@ -174,6 +175,7 @@ func (h *TTSHandler) HandleTTS(w http.ResponseWriter, r *http.Request) {
Voice: r.FormValue("voice"),
Rate: r.FormValue("rate"),
Pitch: r.FormValue("pitch"),
Style: r.FormValue("style"),
}
}
default: