Documentation
¶
Index ¶
- Constants
- type AudioResult
- type AudioResultDetailLanguageResult
- type AudioResultDetailMoanResult
- type AudioResultDetailTextResult
- type AudioSegments
- type BucketInfo
- type Client
- type CreateAudioModerationTaskRequest
- type CreateAudioModerationTaskResponse
- type DescribeTaskDetailRequest
- type DescribeTaskDetailResponse
- type ImageResult
- type ImageResultResult
- type ImageResultsResultDetail
- type ImageResultsResultDetailLocation
- type ImageSegments
- type InputInfo
- type MediaInfo
- type StorageInfo
- type TaskInput
- type TaskLabel
- type TaskResult
Constants ¶
View Source
const APIVersion = "2020-06-08"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AudioResult ¶
type AudioResult struct { // 是否命中 // 0 未命中 // 1 命中 // 注意:此字段可能返回 null,表示取不到有效值。 HitFlag *int64 `json:"HitFlag,omitempty" name:"HitFlag"` // 命中的标签 // Porn 色情 // Polity 政治 // Illegal 违法 // Abuse 谩骂 // Terror 暴恐 // Ad 广告 // Moan 呻吟 // 注意:此字段可能返回 null,表示取不到有效值。 Label *string `json:"Label,omitempty" name:"Label"` // 审核建议,可选值: // Pass 通过, // Review 建议人审, // Block 确认违规 // 注意:此字段可能返回 null,表示取不到有效值。 Suggestion *string `json:"Suggestion,omitempty" name:"Suggestion"` // 得分,0-100 // 注意:此字段可能返回 null,表示取不到有效值。 Score *int64 `json:"Score,omitempty" name:"Score"` // 音频ASR文本 // 注意:此字段可能返回 null,表示取不到有效值。 Text *string `json:"Text,omitempty" name:"Text"` // 音频片段存储URL,有效期为1天 // 注意:此字段可能返回 null,表示取不到有效值。 Url *string `json:"Url,omitempty" name:"Url"` // 音频时长 Duration *string `json:"Duration,omitempty" name:"Duration"` // 拓展字段 Extra *string `json:"Extra,omitempty" name:"Extra"` // 文本审核结果 TextResults []*AudioResultDetailTextResult `json:"TextResults,omitempty" name:"TextResults" list` // 音频呻吟审核结果 MoanResults []*AudioResultDetailMoanResult `json:"MoanResults,omitempty" name:"MoanResults" list` // 音频语种检测结果 LanguageResults []*AudioResultDetailLanguageResult `json:"LanguageResults,omitempty" name:"LanguageResults" list` }
type AudioResultDetailLanguageResult ¶
type AudioResultDetailLanguageResult struct { // 语种 // 注意:此字段可能返回 null,表示取不到有效值。 Label *string `json:"Label,omitempty" name:"Label"` // 得分 // 注意:此字段可能返回 null,表示取不到有效值。 Score *int64 `json:"Score,omitempty" name:"Score"` // 开始时间 // 注意:此字段可能返回 null,表示取不到有效值。 StartTime *float64 `json:"StartTime,omitempty" name:"StartTime"` // 结束时间 // 注意:此字段可能返回 null,表示取不到有效值。 EndTime *float64 `json:"EndTime,omitempty" name:"EndTime"` }
type AudioResultDetailMoanResult ¶
type AudioResultDetailMoanResult struct { // 固定为Moan // 注意:此字段可能返回 null,表示取不到有效值。 Label *string `json:"Label,omitempty" name:"Label"` // 分数 Score *int64 `json:"Score,omitempty" name:"Score"` // 开始时间 StartTime *float64 `json:"StartTime,omitempty" name:"StartTime"` // 结束时间 EndTime *float64 `json:"EndTime,omitempty" name:"EndTime"` }
type AudioResultDetailTextResult ¶
type AudioResultDetailTextResult struct { // 标签 // 注意:此字段可能返回 null,表示取不到有效值。 Label *string `json:"Label,omitempty" name:"Label"` // 命中的关键词 // 注意:此字段可能返回 null,表示取不到有效值。 Keywords []*string `json:"Keywords,omitempty" name:"Keywords" list` // 命中的LibId // 注意:此字段可能返回 null,表示取不到有效值。 LibId *string `json:"LibId,omitempty" name:"LibId"` // 命中的LibName // 注意:此字段可能返回 null,表示取不到有效值。 LibName *string `json:"LibName,omitempty" name:"LibName"` // 得分 // 注意:此字段可能返回 null,表示取不到有效值。 Score *int64 `json:"Score,omitempty" name:"Score"` // 审核建议 // 注意:此字段可能返回 null,表示取不到有效值。 Suggestion *string `json:"Suggestion,omitempty" name:"Suggestion"` // 词库类型 1 黑白库 2 自定义库 LibType *int64 `json:"LibType,omitempty" name:"LibType"` }
type AudioSegments ¶
type AudioSegments struct { // 截帧时间。 // 点播文件:该值为相对于视频偏移时间,单位为秒,例如:0,5,10 // 直播流:该值为时间戳,例如:1594650717 // 注意:此字段可能返回 null,表示取不到有效值。 OffsetTime *string `json:"OffsetTime,omitempty" name:"OffsetTime"` // 结果集 // 注意:此字段可能返回 null,表示取不到有效值。 Result *AudioResult `json:"Result,omitempty" name:"Result"` }
type BucketInfo ¶
type Client ¶
func NewClient ¶
func NewClient(credential *common.Credential, region string, clientProfile *profile.ClientProfile) (client *Client, err error)
func NewClientWithSecretId ¶
Deprecated
func (*Client) CreateAudioModerationTask ¶
func (c *Client) CreateAudioModerationTask(request *CreateAudioModerationTaskRequest) (response *CreateAudioModerationTaskResponse, err error)
通过URL或存储通创建审核任务
func (*Client) DescribeTaskDetail ¶
func (c *Client) DescribeTaskDetail(request *DescribeTaskDetailRequest) (response *DescribeTaskDetailResponse, err error)
查看任务详情
type CreateAudioModerationTaskRequest ¶
type CreateAudioModerationTaskRequest struct { *tchttp.BaseRequest // 业务类型, 定义 模版策略,输出存储配置。如果没有BizType,可以先参考 【创建业务配置】接口进行创建 BizType *string `json:"BizType,omitempty" name:"BizType"` // 回调签名key,具体可以查看签名文档。 Type *string `json:"Type,omitempty" name:"Type"` // 异步检测结果回调通知接收URL。支持HTTP和HTTPS Seed *string `json:"Seed,omitempty" name:"Seed"` // 接收审核信息回调地址,如果设置,则审核过程中产生的违规音频片段和画面截帧发送此接口 CallbackUrl *string `json:"CallbackUrl,omitempty" name:"CallbackUrl"` // 输入的任务信息,最多可以同时创建10个任务 Tasks []*TaskInput `json:"Tasks,omitempty" name:"Tasks" list` }
func NewCreateAudioModerationTaskRequest ¶
func NewCreateAudioModerationTaskRequest() (request *CreateAudioModerationTaskRequest)
func (*CreateAudioModerationTaskRequest) FromJsonString ¶
func (r *CreateAudioModerationTaskRequest) FromJsonString(s string) error
func (*CreateAudioModerationTaskRequest) ToJsonString ¶
func (r *CreateAudioModerationTaskRequest) ToJsonString() string
type CreateAudioModerationTaskResponse ¶
type CreateAudioModerationTaskResponse struct { *tchttp.BaseResponse Response *struct { // 任务创建结果 // 注意:此字段可能返回 null,表示取不到有效值。 Results []*TaskResult `json:"Results,omitempty" name:"Results" list` // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId,omitempty" name:"RequestId"` } `json:"Response"` }
func NewCreateAudioModerationTaskResponse ¶
func NewCreateAudioModerationTaskResponse() (response *CreateAudioModerationTaskResponse)
func (*CreateAudioModerationTaskResponse) FromJsonString ¶
func (r *CreateAudioModerationTaskResponse) FromJsonString(s string) error
func (*CreateAudioModerationTaskResponse) ToJsonString ¶
func (r *CreateAudioModerationTaskResponse) ToJsonString() string
type DescribeTaskDetailRequest ¶
type DescribeTaskDetailRequest struct { *tchttp.BaseRequest // 任务ID,创建任务后返回的TaskId字段 TaskId *string `json:"TaskId,omitempty" name:"TaskId"` // 是否展示所有分片,默认只展示命中规则的分片 ShowAllSegments *bool `json:"ShowAllSegments,omitempty" name:"ShowAllSegments"` }
func NewDescribeTaskDetailRequest ¶
func NewDescribeTaskDetailRequest() (request *DescribeTaskDetailRequest)
func (*DescribeTaskDetailRequest) FromJsonString ¶
func (r *DescribeTaskDetailRequest) FromJsonString(s string) error
func (*DescribeTaskDetailRequest) ToJsonString ¶
func (r *DescribeTaskDetailRequest) ToJsonString() string
type DescribeTaskDetailResponse ¶
type DescribeTaskDetailResponse struct { *tchttp.BaseResponse Response *struct { // 任务ID // 注意:此字段可能返回 null,表示取不到有效值。 TaskId *string `json:"TaskId,omitempty" name:"TaskId"` // 审核时传入的数据Id // 注意:此字段可能返回 null,表示取不到有效值。 DataId *string `json:"DataId,omitempty" name:"DataId"` // 业务类型 // 注意:此字段可能返回 null,表示取不到有效值。 BizType *string `json:"BizType,omitempty" name:"BizType"` // 任务名称 // 注意:此字段可能返回 null,表示取不到有效值。 Name *string `json:"Name,omitempty" name:"Name"` // 状态,可选值: // FINISH 已完成 // PENDING 等待中 // RUNNING 进行中 // ERROR 出错 // CANCELLED 已取消 // 注意:此字段可能返回 null,表示取不到有效值。 Status *string `json:"Status,omitempty" name:"Status"` // 类型 // 注意:此字段可能返回 null,表示取不到有效值。 Type *string `json:"Type,omitempty" name:"Type"` // 审核建议 // 可选: // Pass 通过 // Reveiw 建议复审 // Block 确认违规 // 注意:此字段可能返回 null,表示取不到有效值。 Suggestion *string `json:"Suggestion,omitempty" name:"Suggestion"` // 审核结果 // 注意:此字段可能返回 null,表示取不到有效值。 Labels []*TaskLabel `json:"Labels,omitempty" name:"Labels" list` // 媒体解码信息 // 注意:此字段可能返回 null,表示取不到有效值。 MediaInfo *MediaInfo `json:"MediaInfo,omitempty" name:"MediaInfo"` // 任务信息 // 注意:此字段可能返回 null,表示取不到有效值。 InputInfo *InputInfo `json:"InputInfo,omitempty" name:"InputInfo"` // 创建时间 // 注意:此字段可能返回 null,表示取不到有效值。 CreatedAt *string `json:"CreatedAt,omitempty" name:"CreatedAt"` // 更新时间 // 注意:此字段可能返回 null,表示取不到有效值。 UpdatedAt *string `json:"UpdatedAt,omitempty" name:"UpdatedAt"` // 在秒后重试 // 注意:此字段可能返回 null,表示取不到有效值。 TryInSeconds *int64 `json:"TryInSeconds,omitempty" name:"TryInSeconds"` // 音频结果 // 注意:此字段可能返回 null,表示取不到有效值。 AudioSegments []*AudioSegments `json:"AudioSegments,omitempty" name:"AudioSegments" list` // 图片结果 // 注意:此字段可能返回 null,表示取不到有效值。 ImageSegments []*ImageSegments `json:"ImageSegments,omitempty" name:"ImageSegments" list` // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId,omitempty" name:"RequestId"` } `json:"Response"` }
func NewDescribeTaskDetailResponse ¶
func NewDescribeTaskDetailResponse() (response *DescribeTaskDetailResponse)
func (*DescribeTaskDetailResponse) FromJsonString ¶
func (r *DescribeTaskDetailResponse) FromJsonString(s string) error
func (*DescribeTaskDetailResponse) ToJsonString ¶
func (r *DescribeTaskDetailResponse) ToJsonString() string
type ImageResult ¶
type ImageResult struct { // 违规标志 // 0 未命中 // 1 命中 // 注意:此字段可能返回 null,表示取不到有效值。 HitFlag *int64 `json:"HitFlag,omitempty" name:"HitFlag"` // 命中的标签 // Porn 色情 // Sexy 性感 // Polity 政治 // Illegal 违法 // Abuse 谩骂 // Terror 暴恐 // Ad 广告 // 注意:此字段可能返回 null,表示取不到有效值。 Label *string `json:"Label,omitempty" name:"Label"` // 审核建议,可选值: // Pass 通过, // Review 建议人审, // Block 确认违规 Suggestion *string `json:"Suggestion,omitempty" name:"Suggestion"` // 得分 Score *int64 `json:"Score,omitempty" name:"Score"` // 画面截帧图片结果集 Results []*ImageResultResult `json:"Results,omitempty" name:"Results" list` // 图片URL地址 Url *string `json:"Url,omitempty" name:"Url"` // 附加字段 Extra *string `json:"Extra,omitempty" name:"Extra"` }
type ImageResultResult ¶
type ImageResultResult struct { // 场景 // Porn 色情 // Sexy 性感 // Polity 政治 // Illegal 违法 // Abuse 谩骂 // Terror 暴恐 // Ad 广告 // 注意:此字段可能返回 null,表示取不到有效值。 Scene *string `json:"Scene,omitempty" name:"Scene"` // 是否命中 // 0 未命中 // 1 命中 // 注意:此字段可能返回 null,表示取不到有效值。 HitFlag *int64 `json:"HitFlag,omitempty" name:"HitFlag"` // 审核建议,可选值: // Pass 通过, // Review 建议人审, // Block 确认违规 // 注意:此字段可能返回 null,表示取不到有效值。 Suggestion *string `json:"Suggestion,omitempty" name:"Suggestion"` // 标签 // 注意:此字段可能返回 null,表示取不到有效值。 Label *string `json:"Label,omitempty" name:"Label"` // 子标签 // 注意:此字段可能返回 null,表示取不到有效值。 SubLabel *string `json:"SubLabel,omitempty" name:"SubLabel"` // 分数 // 注意:此字段可能返回 null,表示取不到有效值。 Score *int64 `json:"Score,omitempty" name:"Score"` // 如果命中场景为涉政,则该数据为人物姓名列表,否则null Names []*string `json:"Names,omitempty" name:"Names" list` // 图片OCR文本 // 注意:此字段可能返回 null,表示取不到有效值。 Text *string `json:"Text,omitempty" name:"Text"` // 其他详情 Details []*ImageResultsResultDetail `json:"Details,omitempty" name:"Details" list` }
type ImageResultsResultDetail ¶
type ImageResultsResultDetail struct { // 位置信息 // 注意:此字段可能返回 null,表示取不到有效值。 Location []*ImageResultsResultDetailLocation `json:"Location,omitempty" name:"Location" list` // 任务名称 // 注意:此字段可能返回 null,表示取不到有效值。 Name *string `json:"Name,omitempty" name:"Name"` // OCR识别文本 // 注意:此字段可能返回 null,表示取不到有效值。 Text *string `json:"Text,omitempty" name:"Text"` // 标签 Label *string `json:"Label,omitempty" name:"Label"` // 库ID // 注意:此字段可能返回 null,表示取不到有效值。 LibId *string `json:"LibId,omitempty" name:"LibId"` // 库名称 // 注意:此字段可能返回 null,表示取不到有效值。 LibName *string `json:"LibName,omitempty" name:"LibName"` // 命中的关键词 // 注意:此字段可能返回 null,表示取不到有效值。 Keywords []*string `json:"Keywords,omitempty" name:"Keywords" list` // 建议 // 注意:此字段可能返回 null,表示取不到有效值。 Suggestion *string `json:"Suggestion,omitempty" name:"Suggestion"` // 得分 // 注意:此字段可能返回 null,表示取不到有效值。 Score *int64 `json:"Score,omitempty" name:"Score"` }
type ImageResultsResultDetailLocation ¶
type ImageResultsResultDetailLocation struct { // x坐标 // 注意:此字段可能返回 null,表示取不到有效值。 X *float64 `json:"X,omitempty" name:"X"` // y坐标 // 注意:此字段可能返回 null,表示取不到有效值。 Y *float64 `json:"Y,omitempty" name:"Y"` // 宽度 // 注意:此字段可能返回 null,表示取不到有效值。 Width *int64 `json:"Width,omitempty" name:"Width"` // 高度 // 注意:此字段可能返回 null,表示取不到有效值。 Height *int64 `json:"Height,omitempty" name:"Height"` // 旋转角度 // 注意:此字段可能返回 null,表示取不到有效值。 Rotate *float64 `json:"Rotate,omitempty" name:"Rotate"` }
type ImageSegments ¶
type ImageSegments struct { // 画面截帧结果详情 Result *ImageResult `json:"Result,omitempty" name:"Result"` // 截帧时间。 // 点播文件:该值为相对于视频偏移时间,单位为秒,例如:0,5,10 // 直播流:该值为时间戳,例如:1594650717 OffsetTime *string `json:"OffsetTime,omitempty" name:"OffsetTime"` }
type InputInfo ¶
type InputInfo struct { // 传入的类型可选:URL,COS // 注意:此字段可能返回 null,表示取不到有效值。 Type *string `json:"Type,omitempty" name:"Type"` // Url地址 // 注意:此字段可能返回 null,表示取不到有效值。 Url *string `json:"Url,omitempty" name:"Url"` // 桶信息。当输入当时COS时,该字段不为空 // 注意:此字段可能返回 null,表示取不到有效值。 BucketInfo *BucketInfo `json:"BucketInfo,omitempty" name:"BucketInfo"` }
type MediaInfo ¶
type MediaInfo struct { // 编码格式 Codecs *string `json:"Codecs,omitempty" name:"Codecs"` // 流检测时分片时长 // 注意:此字段可能返回 0,表示取不到有效值。 Duration *int64 `json:"Duration,omitempty" name:"Duration"` // 宽,单位为像素 Width *int64 `json:"Width,omitempty" name:"Width"` // 高,单位为像素 Height *int64 `json:"Height,omitempty" name:"Height"` }
type StorageInfo ¶
type StorageInfo struct { // 类型 可选: // URL 资源链接类型 // COS 腾讯云对象存储类型 Type *string `json:"Type,omitempty" name:"Type"` // 资源链接 Url *string `json:"Url,omitempty" name:"Url"` // 腾讯云存储桶信息 BucketInfo *BucketInfo `json:"BucketInfo,omitempty" name:"BucketInfo"` }
type TaskInput ¶
type TaskInput struct { // 数据ID DataId *string `json:"DataId,omitempty" name:"DataId"` // 任务名 Name *string `json:"Name,omitempty" name:"Name"` // 任务输入 Input *StorageInfo `json:"Input,omitempty" name:"Input"` }
type TaskLabel ¶
type TaskLabel struct { // 命中的标签 // Porn 色情 // Sexy 性感 // Polity 政治 // Illegal 违法 // Abuse 谩骂 // Terror 暴恐 // Ad 广告 // 注意:此字段可能返回 null,表示取不到有效值。 Label *string `json:"Label,omitempty" name:"Label"` // 审核建议,可选值: // Pass 通过, // Review 建议人审, // Block 确认违规 // 注意:此字段可能返回 null,表示取不到有效值。 Suggestion *string `json:"Suggestion,omitempty" name:"Suggestion"` // 得分,分数是 0 ~ 100 // 注意:此字段可能返回 null,表示取不到有效值。 Score *int64 `json:"Score,omitempty" name:"Score"` }
type TaskResult ¶
type TaskResult struct { // 请求时传入的DataId // 注意:此字段可能返回 null,表示取不到有效值。 DataId *string `json:"DataId,omitempty" name:"DataId"` // TaskId,任务ID // 注意:此字段可能返回 null,表示取不到有效值。 TaskId *string `json:"TaskId,omitempty" name:"TaskId"` // 错误码。如果code为OK,则表示创建成功,其他则参考公共错误码 // 注意:此字段可能返回 null,表示取不到有效值。 Code *string `json:"Code,omitempty" name:"Code"` // 如果错误,该字段表示错误详情 // 注意:此字段可能返回 null,表示取不到有效值。 Message *string `json:"Message,omitempty" name:"Message"` }
Click to show internal directories.
Click to hide internal directories.