引包目录名调整
This commit is contained in:
151
digital-human/model/dto/audio_dto.go
Normal file
151
digital-human/model/dto/audio_dto.go
Normal file
@@ -0,0 +1,151 @@
|
||||
package dto
|
||||
|
||||
import (
|
||||
"ai-agent/digital-human/consts"
|
||||
|
||||
"gitea.com/red-future/common/beans"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
"github.com/gogf/gf/v2/os/gtime"
|
||||
)
|
||||
|
||||
// CreateAudioReq 创建音频请求
|
||||
type CreateAudioReq struct {
|
||||
g.Meta `path:"/createAudio" method:"post" tags:"音频管理" summary:"创建音频" dc:"创建新的音频"`
|
||||
// 基础信息
|
||||
Name string `json:"name" v:"required" dc:"音频名称"`
|
||||
Description string `json:"description" dc:"音频描述"`
|
||||
ScriptText string `json:"scriptText" v:"required" dc:"话术文本"`
|
||||
// 音色配置
|
||||
Voice string `json:"voice" dc:"音色:serena/vivian/uncle_fu/ryan/aiden/ono_anna/sohee/eric/dylan,默认serena"`
|
||||
VoiceType string `json:"voiceType" dc:"音色类型:preset/custom(预设/自定义),默认preset"`
|
||||
CustomVoice string `json:"customVoice" dc:"自定义音色ID(用于声音克隆),voiceType=custom时必填"`
|
||||
}
|
||||
|
||||
// CreateAudioRes 创建音频响应
|
||||
type CreateAudioRes struct {
|
||||
Id int64 `json:"id" dc:"音频ID"`
|
||||
}
|
||||
|
||||
// ListAudioReq 获取音频列表请求
|
||||
type ListAudioReq struct {
|
||||
g.Meta `path:"/listAudios" method:"get" tags:"音频管理" summary:"获取音频列表" dc:"分页查询音频列表,支持多条件筛选"`
|
||||
*beans.Page
|
||||
Status consts.AudioStatus `json:"status" dc:"状态:0生成中/1成功/2失败"`
|
||||
Keyword string `json:"keyword" dc:"关键词搜索"`
|
||||
}
|
||||
|
||||
// ListAudioRes 获取音频列表响应
|
||||
type ListAudioRes struct {
|
||||
List []*AudioListItem `json:"list" dc:"音频列表"`
|
||||
Total int64 `json:"total" dc:"总数"`
|
||||
}
|
||||
|
||||
// AudioListItem 音频列表项
|
||||
type AudioListItem struct {
|
||||
ID int64 `json:"id"`
|
||||
Name string `json:"name"`
|
||||
Description string `json:"description"`
|
||||
ScriptText string `json:"scriptText"`
|
||||
AudioURL string `json:"audioUrl"`
|
||||
Status consts.AudioStatus `json:"status"`
|
||||
ErrorMsg string `json:"errorMsg"`
|
||||
Duration int `json:"duration"`
|
||||
ExternalID string `json:"externalId"`
|
||||
Voice string `json:"voice"`
|
||||
VoiceType string `json:"voiceType"`
|
||||
CustomVoice string `json:"customVoice"`
|
||||
CreatedAt *gtime.Time `json:"createdAt"`
|
||||
UpdatedAt *gtime.Time `json:"updatedAt"`
|
||||
}
|
||||
|
||||
// GetAudioReq 获取音频详情请求
|
||||
type GetAudioReq struct {
|
||||
g.Meta `path:"/getAudio" method:"get" tags:"音频管理" summary:"获取音频详情" dc:"获取音频详情"`
|
||||
ID int64 `json:"id" v:"required" dc:"音频ID"`
|
||||
}
|
||||
|
||||
// GetAudioRes 获取音频详情响应
|
||||
type GetAudioRes struct {
|
||||
ID int64 `json:"id"`
|
||||
Name string `json:"name"`
|
||||
Description string `json:"description"`
|
||||
ScriptText string `json:"scriptText"`
|
||||
AudioURL string `json:"audioUrl"`
|
||||
Status consts.AudioStatus `json:"status"`
|
||||
ErrorMsg string `json:"errorMsg"`
|
||||
Duration int `json:"duration"`
|
||||
ExternalID string `json:"externalId"`
|
||||
Voice string `json:"voice"`
|
||||
VoiceType string `json:"voiceType"`
|
||||
CustomVoice string `json:"customVoice"`
|
||||
CreatedAt *gtime.Time `json:"createdAt"`
|
||||
UpdatedAt *gtime.Time `json:"updatedAt"`
|
||||
}
|
||||
|
||||
// UpdateAudioReq 更新音频请求
|
||||
type UpdateAudioReq struct {
|
||||
g.Meta `path:"/updateAudio" method:"put" tags:"音频管理" summary:"更新音频" dc:"更新音频信息"`
|
||||
ID int64 `json:"id" v:"required" dc:"音频ID"`
|
||||
// 基础信息
|
||||
Name string `json:"name" dc:"音频名称"`
|
||||
Description string `json:"description" dc:"音频描述"`
|
||||
// 音色配置
|
||||
Voice string `json:"voice" dc:"音色"`
|
||||
VoiceType string `json:"voiceType" dc:"音色类型"`
|
||||
CustomVoice string `json:"customVoice" dc:"自定义音色ID"`
|
||||
}
|
||||
|
||||
// DeleteAudioReq 删除音频请求
|
||||
type DeleteAudioReq struct {
|
||||
g.Meta `path:"/deleteAudio" method:"delete" tags:"音频管理" summary:"删除音频" dc:"删除音频"`
|
||||
ID int64 `json:"id" v:"required" dc:"音频ID"`
|
||||
}
|
||||
|
||||
// GenerateAudioReq 生成音频请求
|
||||
type GenerateAudioReq struct {
|
||||
g.Meta `path:"/generateAudio" method:"post" tags:"音频管理" summary:"生成音频" dc:"根据话术文本生成音频"`
|
||||
ID int64 `json:"id" v:"required" dc:"音频ID"`
|
||||
}
|
||||
|
||||
// GenerateAudioRes 生成音频响应
|
||||
type GenerateAudioRes struct {
|
||||
TaskID string `json:"taskId" dc:"任务ID"`
|
||||
}
|
||||
|
||||
// TTSReq 文本转语音请求
|
||||
type TTSReq struct {
|
||||
g.Meta `path:"/tts" method:"post" tags:"音频管理" summary:"文本转语音" dc:"将文本转换为语音,直接返回MP3二进制数据"`
|
||||
Text string `json:"text" v:"required" dc:"要转换的文本内容"`
|
||||
Voice string `json:"voice" dc:"音色:默认default"`
|
||||
Speed int `json:"speed" dc:"语速:0.5-2.0,默认1.0"`
|
||||
}
|
||||
|
||||
// TTSRes 文本转语音响应(返回二进制MP3数据)
|
||||
type TTSRes struct {
|
||||
g.Meta `mime:"audio/mpeg"`
|
||||
Data []byte `json:"-" dc:"MP3音频二进制数据"`
|
||||
}
|
||||
|
||||
// GetAudioStatusOptionsReq 获取音频状态选项请求
|
||||
type GetAudioStatusOptionsReq struct {
|
||||
g.Meta `path:"/getAudioStatusOptions" method:"get" tags:"音频管理" summary:"获取音频状态选项" dc:"获取所有音频状态的选项列表"`
|
||||
}
|
||||
|
||||
// GetAudioStatusOptionsRes 获取音频状态选项响应
|
||||
type GetAudioStatusOptionsRes struct {
|
||||
Options []consts.AudioStatusKeyValue `json:"options" dc:"音频状态选项列表"`
|
||||
}
|
||||
|
||||
// Qwen3TTSRequest Qwen3-TTS 请求结构
|
||||
type Qwen3TTSRequest struct {
|
||||
Text string `json:"text"`
|
||||
Speaker string `json:"speaker"` // 预设音色名或克隆音色ID
|
||||
VoiceID string `json:"voice_id,omitempty"` // 克隆音色ID(可选)
|
||||
}
|
||||
|
||||
// Qwen3TTSResponse Qwen3-TTS 响应结构
|
||||
type Qwen3TTSResponse struct {
|
||||
Code int `json:"code"`
|
||||
Msg string `json:"msg"`
|
||||
Audio string `json:"audio"` // base64编码的音频数据
|
||||
}
|
||||
67
digital-human/model/dto/custom_voice_dto.go
Normal file
67
digital-human/model/dto/custom_voice_dto.go
Normal file
@@ -0,0 +1,67 @@
|
||||
package dto
|
||||
|
||||
import (
|
||||
"gitea.com/red-future/common/beans"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
"github.com/gogf/gf/v2/os/gtime"
|
||||
)
|
||||
|
||||
// CreateCustomVoiceReq 创建自定义音色请求
|
||||
type CreateCustomVoiceReq struct {
|
||||
g.Meta `path:"/createCustomVoice" method:"post" tags:"自定义音色" summary:"创建自定义音色" dc:"上传参考音频创建自定义音色"`
|
||||
VoiceType string `json:"voiceType" v:"required" dc:"音色类型 design/clone(设计/克隆)"`
|
||||
Name string `json:"name" v:"required" dc:"音色名称"`
|
||||
Description string `json:"description" dc:"音色描述"`
|
||||
Text string `json:"text" dc:"参考文本"`
|
||||
// 参考音频
|
||||
ReferenceAudio []byte `json:"referenceAudio" dc:"参考音频数据(base64编码的WAV文件,voiceType=clone 时必填)"`
|
||||
}
|
||||
|
||||
// CreateCustomVoiceRes 创建自定义音色响应
|
||||
type CreateCustomVoiceRes struct {
|
||||
VoiceID string `json:"voiceId" dc:"音色ID"`
|
||||
}
|
||||
|
||||
// ListCustomVoiceReq 获取自定义音色列表请求
|
||||
type ListCustomVoiceReq struct {
|
||||
g.Meta `path:"/listCustomVoices" method:"get" tags:"自定义音色" summary:"获取自定义音色列表" dc:"分页查询自定义音色列表"`
|
||||
*beans.Page
|
||||
}
|
||||
|
||||
// ListCustomVoiceRes 获取自定义音色列表响应
|
||||
type ListCustomVoiceRes struct {
|
||||
List []*CustomVoiceItem `json:"list" dc:"自定义音色列表"`
|
||||
Total int64 `json:"total" dc:"总数"`
|
||||
}
|
||||
|
||||
// CustomVoiceItem 自定义音色列表项
|
||||
type CustomVoiceItem struct {
|
||||
ID string `json:"id"`
|
||||
Name string `json:"name"`
|
||||
Description string `json:"description"`
|
||||
Status int `json:"status" dc:"状态:0生成中/1成功/2失败"`
|
||||
ErrorMsg string `json:"errorMsg" dc:"错误信息"`
|
||||
OssFile string `json:"ossFile" dc:"结果文件OSS地址"`
|
||||
CreatedAt *gtime.Time `json:"createdAt"`
|
||||
UpdatedAt *gtime.Time `json:"updatedAt"`
|
||||
}
|
||||
|
||||
// DeleteCustomVoiceReq 删除自定义音色请求
|
||||
type DeleteCustomVoiceReq struct {
|
||||
g.Meta `path:"/deleteCustomVoice" method:"delete" tags:"自定义音色" summary:"删除自定义音色" dc:"删除自定义音色"`
|
||||
VoiceID string `json:"voiceId" v:"required" dc:"音色ID"`
|
||||
}
|
||||
|
||||
// Qwen3VoiceCloneRequest Qwen3-TTS 音色克隆请求
|
||||
type Qwen3VoiceCloneRequest struct {
|
||||
Name string `json:"name"` // 音色名称
|
||||
Audio string `json:"audio"` // base64编码的参考音频
|
||||
Text string `json:"text"` // 参考文本(可选)
|
||||
}
|
||||
|
||||
// Qwen3VoiceCloneResponse Qwen3-TTS 音色克隆响应
|
||||
type Qwen3VoiceCloneResponse struct {
|
||||
Code int `json:"code"`
|
||||
Msg string `json:"msg"`
|
||||
VoiceID string `json:"voice_id"` // 克隆后的音色ID
|
||||
}
|
||||
158
digital-human/model/dto/digitalhuman_dto.go
Normal file
158
digital-human/model/dto/digitalhuman_dto.go
Normal file
@@ -0,0 +1,158 @@
|
||||
package dto
|
||||
|
||||
import (
|
||||
"ai-agent/digital-human/consts"
|
||||
|
||||
"gitea.com/red-future/common/beans"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
"github.com/gogf/gf/v2/os/gtime"
|
||||
)
|
||||
|
||||
// CreateDigitalHumanReq 创建数字人形象请求
|
||||
type CreateDigitalHumanReq struct {
|
||||
g.Meta `path:"/createDigitalHuman" method:"post" tags:"数字人形象管理" summary:"创建数字人形象" dc:"创建新的数字人形象"`
|
||||
// 基础信息
|
||||
Name string `json:"name" v:"required" dc:"数字人名称"`
|
||||
Description string `json:"description" dc:"数字人描述"`
|
||||
ImageURL string `json:"imageUrl" dc:"形象图片URL"`
|
||||
VideoURL string `json:"videoUrl" dc:"形象视频URL"`
|
||||
Status consts.DigitalHumanStatus `json:"status" dc:"状态:1启用/0停用" d:"1"`
|
||||
Tags []string `json:"tags" dc:"标签"`
|
||||
Gender consts.Gender `json:"gender" dc:"性别"`
|
||||
Age consts.Age `json:"age" dc:"年龄段"`
|
||||
Style consts.Style `json:"style" dc:"风格:商务/休闲/正式等"`
|
||||
ExternalID string `json:"externalId" dc:"外部系统ID"`
|
||||
Metadata []map[string]interface{} `json:"metadata" dc:"动态元数据"`
|
||||
}
|
||||
|
||||
// CreateDigitalHumanRes 创建数字人形象响应
|
||||
type CreateDigitalHumanRes struct {
|
||||
Id int64 `json:"id" dc:"数字人形象ID"`
|
||||
}
|
||||
|
||||
// ListDigitalHumanReq 获取数字人形象列表请求
|
||||
type ListDigitalHumanReq struct {
|
||||
g.Meta `path:"/listDigitalHumans" method:"get" tags:"数字人形象管理" summary:"获取数字人形象列表" dc:"分页查询数字人形象列表,支持多条件筛选"`
|
||||
*beans.Page
|
||||
Status consts.DigitalHumanStatus `json:"status" dc:"状态"`
|
||||
Gender consts.Gender `json:"gender" dc:"性别"`
|
||||
Style consts.Style `json:"style" dc:"风格"`
|
||||
Keyword string `json:"keyword" dc:"关键词搜索"`
|
||||
}
|
||||
|
||||
// ListDigitalHumanRes 获取数字人形象列表响应
|
||||
type ListDigitalHumanRes struct {
|
||||
List []*DigitalHumanListItem `json:"list" dc:"数字人形象列表"`
|
||||
Total int64 `json:"total" dc:"总数"`
|
||||
}
|
||||
|
||||
// DigitalHumanListItem 数字人形象列表项
|
||||
type DigitalHumanListItem struct {
|
||||
ID int64 `json:"id"`
|
||||
Name string `json:"name"`
|
||||
Description string `json:"description"`
|
||||
ImageURL string `json:"imageUrl"`
|
||||
VideoURL string `json:"videoUrl"`
|
||||
Status consts.DigitalHumanStatus `json:"status"`
|
||||
Tags []string `json:"tags"`
|
||||
Gender consts.Gender `json:"gender"`
|
||||
Age consts.Age `json:"age"`
|
||||
Style consts.Style `json:"style"`
|
||||
CreatedAt *gtime.Time `json:"createdAt"`
|
||||
UpdatedAt *gtime.Time `json:"updatedAt"`
|
||||
}
|
||||
|
||||
// GetDigitalHumanReq 获取数字人形象详情请求
|
||||
type GetDigitalHumanReq struct {
|
||||
g.Meta `path:"/getDigitalHuman" method:"get" tags:"数字人形象管理" summary:"获取数字人形象详情" dc:"获取数字人形象详情"`
|
||||
ID int64 `json:"id" v:"required" dc:"数字人形象ID"`
|
||||
}
|
||||
|
||||
// GetDigitalHumanRes 获取数字人形象详情响应
|
||||
type GetDigitalHumanRes struct {
|
||||
ID int64 `json:"id"`
|
||||
Name string `json:"name"`
|
||||
Description string `json:"description"`
|
||||
ImageURL string `json:"imageUrl"`
|
||||
VideoURL string `json:"videoUrl"`
|
||||
Status consts.DigitalHumanStatus `json:"status"`
|
||||
Tags []string `json:"tags"`
|
||||
Gender consts.Gender `json:"gender"`
|
||||
Age consts.Age `json:"age"`
|
||||
Style consts.Style `json:"style"`
|
||||
ExternalID string `json:"externalId"`
|
||||
Metadata []map[string]interface{} `json:"metadata"`
|
||||
CreatedAt *gtime.Time `json:"createdAt"`
|
||||
UpdatedAt *gtime.Time `json:"updatedAt"`
|
||||
}
|
||||
|
||||
// UpdateDigitalHumanReq 更新数字人形象请求
|
||||
type UpdateDigitalHumanReq struct {
|
||||
g.Meta `path:"/updateDigitalHuman" method:"put" tags:"数字人形象管理" summary:"更新数字人形象" dc:"更新数字人形象信息"`
|
||||
ID int64 `json:"id" v:"required" dc:"数字人形象ID"`
|
||||
// 基础信息
|
||||
Name string `json:"name" dc:"数字人名称"`
|
||||
Description string `json:"description" dc:"数字人描述"`
|
||||
ImageURL string `json:"imageUrl" dc:"形象图片URL"`
|
||||
VideoURL string `json:"videoUrl" dc:"形象视频URL"`
|
||||
Status consts.DigitalHumanStatus `json:"status" dc:"状态:1启用/0停用"`
|
||||
Tags []string `json:"tags" dc:"标签"`
|
||||
Gender consts.Gender `json:"gender" dc:"性别"`
|
||||
Age consts.Age `json:"age" dc:"年龄段"`
|
||||
Style consts.Style `json:"style" dc:"风格:商务/休闲/正式等"`
|
||||
ExternalID string `json:"externalId" dc:"外部系统ID"`
|
||||
Metadata []map[string]interface{} `json:"metadata" dc:"动态元数据"`
|
||||
}
|
||||
|
||||
// UpdateDigitalHumanStatusReq 更新数字人形象状态请求
|
||||
type UpdateDigitalHumanStatusReq struct {
|
||||
g.Meta `path:"/updateDigitalHumanStatus" method:"put" tags:"数字人形象管理" summary:"更新数字人形象状态" dc:"更新数字人形象状态"`
|
||||
ID int64 `json:"id" v:"required" dc:"数字人形象ID"`
|
||||
Status consts.DigitalHumanStatus `json:"status" v:"required|in:1,0" dc:"状态:1启用/0停用"`
|
||||
}
|
||||
|
||||
// DeleteDigitalHumanReq 删除数字人形象请求
|
||||
type DeleteDigitalHumanReq struct {
|
||||
g.Meta `path:"/deleteDigitalHuman" method:"delete" tags:"数字人形象管理" summary:"删除数字人形象" dc:"删除数字人形象"`
|
||||
ID int64 `json:"id" v:"required" dc:"数字人形象ID"`
|
||||
}
|
||||
|
||||
// GetDigitalHumanStatusOptionsReq 获取数字人状态选项请求
|
||||
type GetDigitalHumanStatusOptionsReq struct {
|
||||
g.Meta `path:"/getDigitalHumanStatusOptions" method:"get" tags:"数字人形象管理" summary:"获取数字人状态选项" dc:"获取所有数字人状态的选项列表"`
|
||||
}
|
||||
|
||||
// GetDigitalHumanStatusOptionsRes 获取数字人状态选项响应
|
||||
type GetDigitalHumanStatusOptionsRes struct {
|
||||
Options []consts.StatusKeyValue `json:"options" dc:"状态选项列表"`
|
||||
}
|
||||
|
||||
// GetGenderOptionsReq 获取性别选项请求
|
||||
type GetGenderOptionsReq struct {
|
||||
g.Meta `path:"/getGenderOptions" method:"get" tags:"数字人形象管理" summary:"获取性别选项" dc:"获取所有性别选项列表"`
|
||||
}
|
||||
|
||||
// GetGenderOptionsRes 获取性别选项响应
|
||||
type GetGenderOptionsRes struct {
|
||||
Options []consts.GenderKeyValue `json:"options" dc:"性别选项列表"`
|
||||
}
|
||||
|
||||
// GetAgeOptionsReq 获取年龄段选项请求
|
||||
type GetAgeOptionsReq struct {
|
||||
g.Meta `path:"/getAgeOptions" method:"get" tags:"数字人形象管理" summary:"获取年龄段选项" dc:"获取所有年龄段选项列表"`
|
||||
}
|
||||
|
||||
// GetAgeOptionsRes 获取年龄段选项响应
|
||||
type GetAgeOptionsRes struct {
|
||||
Options []consts.AgeKeyValue `json:"options" dc:"年龄段选项列表"`
|
||||
}
|
||||
|
||||
// GetStyleOptionsReq 获取风格选项请求
|
||||
type GetStyleOptionsReq struct {
|
||||
g.Meta `path:"/getStyleOptions" method:"get" tags:"数字人形象管理" summary:"获取风格选项" dc:"获取所有风格选项列表"`
|
||||
}
|
||||
|
||||
// GetStyleOptionsRes 获取风格选项响应
|
||||
type GetStyleOptionsRes struct {
|
||||
Options []consts.StyleKeyValue `json:"options" dc:"风格选项列表"`
|
||||
}
|
||||
131
digital-human/model/dto/video_dto.go
Normal file
131
digital-human/model/dto/video_dto.go
Normal file
@@ -0,0 +1,131 @@
|
||||
package dto
|
||||
|
||||
import (
|
||||
"ai-agent/digital-human/consts"
|
||||
|
||||
"gitea.com/red-future/common/beans"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
"github.com/gogf/gf/v2/os/gtime"
|
||||
)
|
||||
|
||||
// CreateVideoReq 创建视频请求
|
||||
type CreateVideoReq struct {
|
||||
g.Meta `path:"/createVideo" method:"post" tags:"视频管理" summary:"创建视频" dc:"创建新的视频任务"`
|
||||
// 基础信息
|
||||
Name string `json:"name" v:"required" dc:"视频名称"`
|
||||
Description string `json:"description" dc:"视频描述"`
|
||||
DigitalHumanID int64 `json:"digitalHumanId" v:"required" dc:"数字人形象ID"`
|
||||
AudioID int64 `json:"audioId" v:"required" dc:"音频ID"`
|
||||
Resolution consts.Resolution `json:"resolution" dc:"分辨率:480p/720p/1080p/2k/4k/8k"`
|
||||
}
|
||||
|
||||
// CreateVideoRes 创建视频响应
|
||||
type CreateVideoRes struct {
|
||||
Id int64 `json:"id" dc:"视频ID"`
|
||||
}
|
||||
|
||||
// ListVideoReq 获取视频列表请求
|
||||
type ListVideoReq struct {
|
||||
g.Meta `path:"/listVideos" method:"get" tags:"视频管理" summary:"获取视频列表" dc:"分页查询视频列表,支持多条件筛选"`
|
||||
*beans.Page
|
||||
Status consts.VideoStatus `json:"status" dc:"状态:0生成中/1成功/2失败"`
|
||||
DigitalHumanID int64 `json:"digitalHumanId" dc:"数字人形象ID"`
|
||||
Keyword string `json:"keyword" dc:"关键词搜索"`
|
||||
}
|
||||
|
||||
// ListVideoRes 获取视频列表响应
|
||||
type ListVideoRes struct {
|
||||
List []*VideoListItem `json:"list" dc:"视频列表"`
|
||||
Total int64 `json:"total" dc:"总数"`
|
||||
}
|
||||
|
||||
// VideoListItem 视频列表项
|
||||
type VideoListItem struct {
|
||||
ID int64 `json:"id"`
|
||||
Name string `json:"name"`
|
||||
Description string `json:"description"`
|
||||
DigitalHumanID int64 `json:"digitalHumanId"`
|
||||
DigitalHumanName string `json:"digitalHumanName"`
|
||||
AudioID int64 `json:"audioId"`
|
||||
AudioURL string `json:"audioUrl"`
|
||||
VideoURL string `json:"videoUrl"`
|
||||
Status consts.VideoStatus `json:"status"`
|
||||
ErrorMsg string `json:"errorMsg"`
|
||||
Duration int `json:"duration"`
|
||||
Resolution consts.Resolution `json:"resolution"`
|
||||
ThumbnailURL string `json:"thumbnailUrl"`
|
||||
CreatedAt *gtime.Time `json:"createdAt"`
|
||||
UpdatedAt *gtime.Time `json:"updatedAt"`
|
||||
}
|
||||
|
||||
// GetVideoReq 获取视频详情请求
|
||||
type GetVideoReq struct {
|
||||
g.Meta `path:"/getVideo" method:"get" tags:"视频管理" summary:"获取视频详情" dc:"获取视频详情"`
|
||||
ID int64 `json:"id" v:"required" dc:"视频ID"`
|
||||
}
|
||||
|
||||
// GetVideoRes 获取视频详情响应
|
||||
type GetVideoRes struct {
|
||||
ID int64 `json:"id"`
|
||||
Name string `json:"name"`
|
||||
Description string `json:"description"`
|
||||
DigitalHumanID int64 `json:"digitalHumanId"`
|
||||
DigitalHumanName string `json:"digitalHumanName"`
|
||||
AudioID int64 `json:"audioId"`
|
||||
AudioURL string `json:"audioUrl"`
|
||||
VideoURL string `json:"videoUrl"`
|
||||
Status consts.VideoStatus `json:"status"`
|
||||
ErrorMsg string `json:"errorMsg"`
|
||||
Duration int `json:"duration"`
|
||||
Resolution consts.Resolution `json:"resolution"`
|
||||
ThumbnailURL string `json:"thumbnailUrl"`
|
||||
ExternalTaskID string `json:"externalTaskId"`
|
||||
CreatedAt *gtime.Time `json:"createdAt"`
|
||||
UpdatedAt *gtime.Time `json:"updatedAt"`
|
||||
}
|
||||
|
||||
// UpdateVideoReq 更新视频请求
|
||||
type UpdateVideoReq struct {
|
||||
g.Meta `path:"/updateVideo" method:"put" tags:"视频管理" summary:"更新视频" dc:"更新视频信息"`
|
||||
ID int64 `json:"id" v:"required" dc:"视频ID"`
|
||||
// 基础信息
|
||||
Name string `json:"name" dc:"视频名称"`
|
||||
Description string `json:"description" dc:"视频描述"`
|
||||
}
|
||||
|
||||
// DeleteVideoReq 删除视频请求
|
||||
type DeleteVideoReq struct {
|
||||
g.Meta `path:"/deleteVideo" method:"delete" tags:"视频管理" summary:"删除视频" dc:"删除视频"`
|
||||
ID int64 `json:"id" v:"required" dc:"视频ID"`
|
||||
}
|
||||
|
||||
// GenerateVideoReq 生成视频请求
|
||||
type GenerateVideoReq struct {
|
||||
g.Meta `path:"/generateVideo" method:"post" tags:"视频管理" summary:"生成视频" dc:"选择数字人,选择已生成的音频,调用数字人形象与音频合成形成视频"`
|
||||
ID int64 `json:"id" v:"required" dc:"视频ID"`
|
||||
}
|
||||
|
||||
// GenerateVideoRes 生成视频响应
|
||||
type GenerateVideoRes struct {
|
||||
TaskID string `json:"taskId" dc:"任务ID"`
|
||||
}
|
||||
|
||||
// GetVideoStatusOptionsReq 获取视频状态选项请求
|
||||
type GetVideoStatusOptionsReq struct {
|
||||
g.Meta `path:"/getVideoStatusOptions" method:"get" tags:"视频管理" summary:"获取视频状态选项" dc:"获取所有视频状态的选项列表"`
|
||||
}
|
||||
|
||||
// GetVideoStatusOptionsRes 获取视频状态选项响应
|
||||
type GetVideoStatusOptionsRes struct {
|
||||
Options []consts.VideoStatusKeyValue `json:"options" dc:"视频状态选项列表"`
|
||||
}
|
||||
|
||||
// GetResolutionOptionsReq 获取分辨率选项请求
|
||||
type GetResolutionOptionsReq struct {
|
||||
g.Meta `path:"/getResolutionOptions" method:"get" tags:"视频管理" summary:"获取分辨率选项" dc:"获取所有分辨率的选项列表"`
|
||||
}
|
||||
|
||||
// GetResolutionOptionsRes 获取分辨率选项响应
|
||||
type GetResolutionOptionsRes struct {
|
||||
Options []consts.ResolutionKeyValue `json:"options" dc:"分辨率选项列表"`
|
||||
}
|
||||
Reference in New Issue
Block a user