feat: 弃用腾讯tts,该用火山引擎tts

This commit is contained in:
Blizzard
2026-03-20 17:06:19 +08:00
parent e4b7ee04cc
commit f4bfe2d609
13 changed files with 294 additions and 173 deletions
+3 -1
View File
@@ -150,6 +150,7 @@ func (a *ProgramApi) DeleteProgram(c *gin.Context) {
// @Summary 生成TTS语音
// @Produce json
// @Param id query string true "节目ID"
// @Param speaker query string false "音色(默认 zh_male_dayi_uranus_bigtts)"
// @Success 200 {object} response.Response
// @Router /radio/program/generate-tts [get]
func (a *ProgramApi) GenerateTTS(c *gin.Context) {
@@ -158,8 +159,9 @@ func (a *ProgramApi) GenerateTTS(c *gin.Context) {
response.FailWithMsg("参数错误: id不能为空", c)
return
}
speaker := c.Query("speaker")
if err := programService.GenerateTTS(id); err != nil {
if err := programService.GenerateTTS(id, speaker); err != nil {
global.Logger.Error("生成TTS语音失败!", zap.Error(err))
response.FailWithMsg(err.Error(), c)
return