feat: 弃用腾讯tts,该用火山引擎tts
This commit is contained in:
@@ -176,3 +176,22 @@ func (a *AnalyticsApi) GetPreferenceAnalysis(c *gin.Context) {
|
||||
}
|
||||
response.OkWithData(data, c)
|
||||
}
|
||||
|
||||
// GetVipStats 获取VIP统计数据
|
||||
// @Tags 数据分析
|
||||
// @Summary 获取VIP统计数据
|
||||
// @Param startDate query string false "开始日期"
|
||||
// @Param endDate query string false "结束日期"
|
||||
// @Success 200 {object} response.Response
|
||||
// @Router /radio/analytics/vip-stats [get]
|
||||
func (a *AnalyticsApi) GetVipStats(c *gin.Context) {
|
||||
var req request.TrendQuery
|
||||
c.ShouldBindQuery(&req)
|
||||
data, err := analyticsService.GetVipStats(req.StartDate, req.EndDate)
|
||||
if err != nil {
|
||||
global.Logger.Error("获取VIP统计数据失败!", zap.Error(err))
|
||||
response.FailWithMsg(err.Error(), c)
|
||||
return
|
||||
}
|
||||
response.OkWithData(data, c)
|
||||
}
|
||||
|
||||
@@ -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