| | |
| | | "speechAnalysis/models" |
| | | "speechAnalysis/pkg/logx" |
| | | "speechAnalysis/request" |
| | | "speechAnalysis/response" |
| | | "speechAnalysis/service" |
| | | "speechAnalysis/utils/upload" |
| | | "strings" |
| | |
| | | // @Tags 音频 |
| | | // @Summary 音频分析检索 |
| | | // @Produce application/json |
| | | // @Param object query request.GetAudioList true "查询参数" |
| | | // @Param object query request.GetAudioList true "参数" |
| | | // @Success 200 {object} util.ResponseList{data=[]models.Audio} "成功" |
| | | // @Router /api-sa/v1/audio/list [get] |
| | | func (slf AudioCtl) List(c *gin.Context) { |
| | |
| | | // @Tags 音频 |
| | | // @Summary 处理音频 |
| | | // @Produce application/json |
| | | // @Param object body request.ProcessAudio true "音频信息" |
| | | // @Param object body request.ProcessAudio true "参数" |
| | | // @Success 200 {object} util.Response "成功" |
| | | // @Router /api-sa/v1/audio/process [post] |
| | | func (slf AudioCtl) Process(c *gin.Context) { |
| | |
| | | // @Tags 音频 |
| | | // @Summary 批量处理音频 |
| | | // @Produce application/json |
| | | // @Param object body request.BatchProcessAudio true "音频信息" |
| | | // @Param object body request.BatchProcessAudio true "参数" |
| | | // @Success 200 {object} util.Response "成功" |
| | | // @Router /api-sa/v1/audio/batchProcess [post] |
| | | func (slf AudioCtl) BatchProcess(c *gin.Context) { |
| | |
| | | // @Tags 音频 |
| | | // @Summary 删除音频 |
| | | // @Produce application/json |
| | | // @Param object body request.ProcessAudio true "音频信息" |
| | | // @Param object body request.ProcessAudio true "参数" |
| | | // @Success 200 {object} util.Response "成功" |
| | | // @Router /api-sa/v1/audio/delete [post] |
| | | func (slf AudioCtl) Delete(c *gin.Context) { |
| | |
| | | // @Tags 音频 |
| | | // @Summary 批量删除音频 |
| | | // @Produce application/json |
| | | // @Param object body request.BatchProcessAudio true "音频信息" |
| | | // @Param object body request.BatchProcessAudio true "参数" |
| | | // @Success 200 {object} util.Response "成功" |
| | | // @Router /api-sa/v1/audio/batchDelete [post] |
| | | func (slf AudioCtl) BatchDelete(c *gin.Context) { |
| | |
| | | |
| | | util.ResponseFormat(c, code.DeleteSuccess, "成功") |
| | | } |
| | | |
| | | // Follow |
| | | // @Tags 音频 |
| | | // @Summary 关注/取消关注 |
| | | // @Produce application/json |
| | | // @Param object body request.FollowReq true "参数" |
| | | // @Success 200 {object} util.Response{data=response.FollowResp} "成功" |
| | | // @Router /api-sa/v1/audio/follow [post] |
| | | func (slf AudioCtl) Follow(c *gin.Context) { |
| | | var params request.ProcessAudio |
| | | if err := c.ShouldBind(¶ms); err != nil { |
| | | util.ResponseFormat(c, code.RequestParamError, err.Error()) |
| | | return |
| | | } |
| | | |
| | | followStatus, err := service.Follow(params.ID) |
| | | if err != nil { |
| | | util.ResponseFormat(c, code.InternalError, err.Error()) |
| | | return |
| | | } |
| | | resp := response.FollowResp{FollowStatus: followStatus} |
| | | |
| | | util.ResponseFormat(c, code.UpdateSuccess, resp) |
| | | } |