feat: 弃用腾讯tts,该用火山引擎tts
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user