tencent cloud

All product documents
Cloud Object Storage
Querying Audio Moderation Job Result
Last updated: 2024-06-12 16:01:53
Querying Audio Moderation Job Result
Last updated: 2024-06-12 16:01:53

Feature Description

This API is used to query the status or result of an audio moderation job.
Note:
Audio moderation results are retained for three months, so you can query moderation results in the past three months through this API.

Request

Sample request

GET /audio/auditing/<jobId> HTTP/1.1
Host: <BucketName-APPID>.ci.<Region>.myqcloud.com
Date: <GMT Date>
Authorization: <Auth String>
Note:
Authorization: Auth String (for more information, see Request Signature).

Request headers

This API only uses common request headers. For more information, see Common Request Headers.

Request body

This request does not have a request body.

Response

Response headers

This API only returns common response headers. For more information, see Common Response Headers.

Response body

The response body returns application/xml data. The following contains all the nodes:
<Response>
<JobsDetail>
<Code>Success</Code>
<Message>Success</Message>
<DataId></DataId>
<JobId></JobId>
<State></State>
<CreationTime></CreationTime>
<Object></Object>
<Result>1</Result>
<AudioText></AudioText>
<PornInfo>
<HitFlag></HitFlag>
<Score></Score>
<Label></Label>
</PornInfo>
<Section>
<Url>https://cos.ap-guangzhou.myqcloud.com/0.mp3</Url>
<OffsetTime>0</OffsetTime>
<Duration>3000</Duration>
<Text>Haha</Text>
<PornInfo>
<HitFlag></HitFlag>
<Score></Score>
<Keywords></Keywords>
</PornInfo>
</Section>
</JobsDetail>
<RequestId></RequestId>
</Response>
The nodes are as described below:
Node Name (Keyword)
Parent Node
Description
Type
Response
None
Audio moderation job result.
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
The ID automatically generated by the server for a request when the request is sent, which can help locate problems faster.
String
JobsDetail has the following sub-nodes:
Node Name (Keyword)
Parent Node
Description
Type
Code
Response.JobsDetail
Error code, which will be returned only if State is Failed. For more information, see Error Codes.
String
Message
Response.JobsDetail
Error description, which will be returned only if State is Failed.
String
DataId
Response.JobsDetail
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
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
Object
Response.JobsDetail
If the moderated audio file is a file stored in COS, this field indicates its filename.
String
Url
Response.JobsDetail
If the moderated audio file is at a URL, this field indicates the URL.
String
Label
Response.JobsDetail
This field is used to return the maliciousness tag with the highest priority in the detection result, which represents the moderation result suggested by the model. We recommend you handle different types of violations and suggestions based on your business needs. Returned values: Normal, Porn, Ads, and other types of unsafe or inappropriate content.
String
Result
Response.JobsDetail
This field indicates the moderation result. You can perform subsequent operations based on the result. We recommend you handle different results based on your business needs.
Valid values: 0 (normal), 1 (sensitive), and 2 (suspiciously sensitive, with human review recommended).
Integer
AudioText
Response.JobsDetail
This field is used to return the recognized text content of the audio file.
String
PornInfo
Response.JobsDetail
The moderation result of the pornographic information moderation scene.
Container
AdsInfo
Response.JobsDetail
The moderation result of the advertising information moderation scene.
Container
Section
Response.JobsDetail
When the audio is too long, it will be segmented. This field is used to return the moderation result of an audio segment, mainly including the start time and audio moderation result.
Container Array
UserInfo
Response.JobsDetail
Business field. This field will not exist if UserInfo is not set during job creation.
Container
PornInfo and AdsInfo have the following sub-nodes:
Node Name (Keyword)
Parent Node
Description
Type
HitFlag
Response.JobsDetail.*Info
The moderation result returned for the moderation scene. Returned values:
0: Normal.
1: Confirmed as a violation of the current scene.
2: Suspected as a violation of the current scene.
Integer
Score
Response.JobsDetail.*Info
The confidence the moderation result hits the moderation scene. Value range: 0–100. The higher the value, the more likely the content hits the currently returned moderation scene.
For example, Porn 99 means that the content is very likely to be pornographic.
Integer
Label
Response.JobsDetail.*Info
Result tag of this moderation job. If a sensitive keyword is hit, the keyword will be returned in this field.
String
Section has the following sub-nodes:
Node Name (Keyword)
Parent Node
Description
Type
Url
Response.JobsDetail.Section
URL of the current audio segment, at which you can get the content of the segment. It must be a standard URL.
Note: Each URL is valid for two hours. If you need to view the data after two hours, initiate a new query request.
String
Text
Response.JobsDetail.Section
This field is used to return the ASR text recognition result of the current audio segment.
String
OffsetTime
Response.JobsDetail.Section
This field is used to return the time where the current audio segment is in the entire audio in milliseconds, such as 5000 (i.e., 5000 milliseconds after the audio starts).
Integer
Duration
Response.JobsDetail.Section
Duration of the current audio segment in milliseconds.
Integer
Label
Response.JobsDetail.Section
This field is used to return the maliciousness tag with the highest priority in the detection result, which represents the moderation result suggested by the model. We recommend you handle different types of violations and suggestions based on your business needs. Returned values: Normal, Porn, Ads, and other types of unsafe or inappropriate content.
String
Result
Response.JobsDetail.Section
This field indicates the moderation result. You can perform subsequent operations based on the result. We recommend you handle different results based on your business needs.
Valid values: 0 (normal), 1 (sensitive), and 2 (suspiciously sensitive, with human review recommended).
Integer
PornInfo
Response.JobsDetail.Section
The moderation result of the pornographic information moderation scene.
Container
AdsInfo
Response.JobsDetail.Section
The moderation result of the advertising information moderation scene.
Container
PornInfo and AdsInfo have the following sub-nodes:
Node Name (Keyword)
Parent Node
Description
Type
HitFlag
Response.JobsDetail.Section.*Info
The moderation result returned for the moderation scene. Returned values:
0: Normal.
1: Confirmed as a violation of the current scene.
2: Suspected as a violation of the current scene.
Integer
Score
Response.JobsDetail.Section.*Info
The confidence the moderation result hits the moderation scene. Value range: 0–100. The higher the value, the more likely the content hits the currently returned moderation scene.
For example, Porn 99 means that the content is very likely to be pornographic.
Integer
Category
Response.JobsDetail.Section.*Info
This field is a subset of Label, indicating the specific moderation category hit; for example, Sexy presents the sexy category in the Porn tag.
String
Keywords
Response.JobsDetail.Section.*Info
The sensitive keyword hit by the moderation job. Nothing will be returned if there is none.
String Array
UserInfo has the following sub-nodes:
Node Name (Keyword)
Parent Node
Description
Type
TokenId
Response.JobsDetail.UserInfo
Business TokenId, which can contain up to 128 bytes.
String
Nickname
Response.JobsDetail.UserInfo
Business Nickname, which can contain up to 128 bytes.
String
DeviceId
Response.JobsDetail.UserInfo
Business DeviceId, which can contain up to 128 bytes.
String
AppId
Response.JobsDetail.UserInfo
Business AppId, which can contain up to 128 bytes.
String
Room
Response.JobsDetail.UserInfo
Business Room, which can contain up to 128 bytes.
String
IP
Response.JobsDetail.UserInfo
Business IP, which can contain up to 128 bytes.
String
Type
Response.JobsDetail.UserInfo
Business Type, which can contain up to 128 bytes.
String

Error codes

There are no special error messages for this request. For common error messages, see Error Codes.

Samples

Request

GET /audio/auditing/vab1ca9fc8a3ed11ea834c525400863904 HTTP/1.1
Accept: */*
Authorization: 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.com

Response

HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: 666
Connection: keep-alive
Date: Thu, 15 Jun 2017 12:37:29 GMT
Server: tencent-ci
x-ci-request-id: NTk0MjdmODlfMjQ4OGY3XzYzYzhf****

<Response>
<JobsDetail>
<JobId>aab1ca9fc8a3ed11ea834c525400863904</JobId>
<State>Success</State>
<CreationTime>2019-07-07T12:12:12+0800</CreationTime>
<Object>a.mp3</Object>
<Result>1</Result>
<AudioText>wc xx</AudioText>
<PornInfo>
<HitFlag>1</HitFlag>
<Score>91</Score>
<Label>xx</Label>
</PornInfo>
<AdsInfo>
<HitFlag>0</HitFlag>
<Score>0</Score>
<Label></Label>
</AdsInfo>
<Section>
<AdsInfo>
<HitFlag>0</HitFlag>
<Score>0</Score>
</AdsInfo>
<Duration>30000</Duration>
<OffsetTime>0</OffsetTime>
<PornInfo>
<HitFlag>1</HitFlag>
<Score>91</Score>
<Keywords>xx</Keywords>
<Keywords>wc</Keywords>
</PornInfo>
<Text>wc xx</Text>
<Url>https://auditing-1250000000.cos.ap-guangzhou.myqcloud.com/q9MhdztF/0.mp3</Url>
</Section>
</JobsDetail>
<RequestId>xxxxxxxxxxxxxx</RequestId>
</Response>

Was this page helpful?
You can also Contact Sales or Submit a Ticket for help.
Yes
No

Feedback

Contact Us

Contact our sales team or business advisors to help your business.

Technical Support

Open a ticket if you're looking for further assistance. Our Ticket is 7x24 avaliable.

7x24 Phone Support