Callback
or calling the API for Querying Audio Moderation Job Result.POST /audio/auditing HTTP/1.1Host: <BucketName-APPID>.ci.<Region>.myqcloud.comDate: <GMT Date>Authorization: <Auth String>Content-Length: <length>Content-Type: application/xml<body>
<Request><Input><Object></Object><Url></Url><DataId></DataId></Input><Conf><Callback></Callback><BizType></BizType></Conf></Request>
Node Name (Keyword) | Parent Node | Description | Type | Required |
Request | None | Audio moderation configuration. | Container | Yes |
Request
has the following sub-nodes:Node Name (Keyword) | Parent Node | Description | Type | Required |
Input | Request | Content to be moderated. | Container | Yes |
Conf | Request | Moderation rule configuration. | Container | Yes |
Input
has the following sub-nodes:Node Name (Keyword) | Parent Node | Description | Type | Required |
Object | Request.Input | Name of the audio file stored in the COS bucket; for example, if the file is audio.mp3 in the test directory, then the filename is test/audio.mp3 . Either Object or Url can be selected at a time. | String | No |
Url | Request.Input | Full URL of the audio file, such as http://examplebucket-1250000000.cos.ap-shanghai.myqcloud.com/audio.mp3 . Either Object or Url can be selected at a time. | String | No |
DataId | Request.Input | This field will return the original content in the moderation result, which can contain up to 512 bytes. You can use this field to uniquely identify the data to be moderated in your business. | String | No |
UserInfo | Request.Input | Business field. | Container | No |
UserInfo
has the following sub-nodes:Node Name (Keyword) | Parent Node | Description | Type | Required |
TokenId | Request.Input.UserInfo | Business TokenId , which can contain up to 128 bytes. | String | No |
Nickname | Request.Input.UserInfo | Business Nickname , which can contain up to 128 bytes. | String | No |
DeviceId | Request.Input.UserInfo | Business DeviceId , which can contain up to 128 bytes. | String | No |
AppId | Request.Input.UserInfo | Business AppId , which can contain up to 128 bytes. | String | No |
Room | Request.Input.UserInfo | Business Room , which can contain up to 128 bytes. | String | No |
IP | Request.Input.UserInfo | Business IP , which can contain up to 128 bytes. | String | No |
Type | Request.Input.UserInfo | Business Type , which can contain up to 128 bytes. | String | No |
ReceiveTokenId | Request.Input.UserInfo | Business ReceiveTokenId , which can contain up to 128 bytes. | String | No |
Gender | Request.Input.UserInfo | Business Gender , which can contain up to 128 bytes. | String | No |
Level | Request.Input.UserInfo | Business Level , which can contain up to 128 bytes. | String | No |
Role | Request.Input.UserInfo | Business Role , which can contain up to 128 bytes. | String | No |
Conf
has the following sub-nodes:Node Name (Keyword) | Parent Node | Description | Type | Required |
BizType | Request.Conf | Unique identifier of the moderation policy. You can configure the scenes you want to moderate on the moderation policy page in the console, such as pornographic and advertising information. For configuration guidelines, see Setting Moderation Policy. You can get BizType in the console. If BizType is specified, the moderation request will perform moderation based on the scenes configured in the moderation policy. If BizType is not specified, the default moderation policy will be used automatically. | String | No |
Callback | Request.Conf | The moderation result can be sent to your callback address in the form of a callback. Addresses starting with http:// or https:// are supported, such as http://www.callback.com . | String | No |
CallbackVersion | Request.Conf | Structure of the callback content. Valid values: Simple (the callback content contains basic information), Detail (the callback content contains detailed information). Default value: Simple. | string | No |
CallbackType | Request.Conf | Callback segment type. Valid values: 1 (calls back all audio segments); 2 (calls back non-compliant audio segments). Default value: 1 . | Integer | No |
Freeze | Request.Conf | This field can be used to set automatic freezing for audio files based on the moderation score. It takes effect only if the audio moderated in input is an object . | Container | No |
Freeze
has the following sub-nodes:Node Name (Keyword) | Parent Node | Description | Type | Required |
PornScore | Request.Conf.Freeze | The threshold at or above which automatic freezing will be performed for the porn moderation result. Value range: [0,100]. If this field is left empty (default value), automatic freezing will not be performed. | Integer | No |
AdsScore | Request.Conf.Freeze | The threshold at or above which automatic freezing will be performed for the ad moderation result. Value range: [0,100]. If this field is left empty (default value), automatic freezing will not be performed. | Integer | No |
<Response><JobsDetail><DataId></DataId><JobId></JobId><State></State><CreationTime></CreationTime></JobsDetail><RequestId></RequestId></Response>
Node Name (Keyword) | Parent Node | Description | Type |
Response | None | The specific response content returned by audio moderation. | Container |
Response
has the following sub-nodes:Node Name (Keyword) | Parent Node | Description | Type |
JobsDetail | Response | Details of the audio moderation job. | Container |
RequestId | Response | ID automatically generated by the server for a request when the request is sent, which can be used to facilitate fault locating. | String |
JobsDetail
has the following sub-nodes:Node Name (Keyword) | Parent Node | Description | Type |
DataId | Response.JobsDetail | Unique business ID added in the request. | String |
JobId | Response.JobsDetail | ID of the audio moderation job. | String |
State | Response.JobsDetail | Status of the audio moderation job. Valid values: Submitted, Success, Failed, Auditing. | String |
CreationTime | Response.JobsDetail | Creation time of the audio moderation job. | String |
POST /audio/auditing HTTP/1.1Authorization: q-sign-algorithm=sha1&q-ak=AKIDZfbOAo7cllgPvF9cXFrJD0a1ICvR****&q-sign-time=1497530202;1497610202&q-key-time=1497530202;1497610202&q-header-list=&q-url-param-list=&q-signature=28e9a4986df11bed0255e97ff90500557e0e****Host: examplebucket-1250000000.ci.ap-beijing.myqcloud.comContent-Length: 166Content-Type: application/xml<Request><Input><Object>a.mp3</Object><DataId>123-fdrsg-123</DataID></Input><Conf><BizType>b81d45f94xxxxxxxxa9506f45a11</BizType><Callback>http://callback.com/</Callback></Conf></Request>
HTTP/1.1 200 OKContent-Type: application/xmlContent-Length: 230Connection: keep-aliveDate: Thu, 15 Jun 2017 12:37:29 GMTServer: tencent-cix-ci-request-id: NTk0MjdmODlfMjQ4OGY3XzYzYzhf****<Response><JobsDetail><DataId>123-fdrsg-123</DataID><JobId>vab1ca9fc8a3ed11ea834c525400863904</JobId><State>Submitted</State><CreationTime>2019-07-07T12:12:12+0800</CreationTime></JobsDetail><RequestId>xxxxxxxxxxxxxx</RequestId></Response>
Was this page helpful?