Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Situation Awareness
Managed Threat Detection
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive
Help Center/ Content Moderation/ API Reference/ APIs/ Audio Moderation/ Querying an Audio Moderation Job

Querying an Audio Moderation Job

Updated on 2024-11-04 GMT+08:00

Function

This API is used to query the processing status and result of an audio review job and return the recognition result to you.

URI

GET /v3/{project_id}/moderation/audio/jobs/{job_id}

Table 1 Path parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID. For details about how to obtain the project ID, see Obtaining a Project ID.

job_id

Yes

String

Job ID returned when a job is created

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

User token, which can be obtained by calling the IAM API (The token is the value of X-Subject-Token in the response header.)

Response Parameters

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

job_id

String

Job ID

status

String

Job status. The options are as follows:

  • running: The job is running.
  • succeeded: The job was executed successfully.
  • failed: The job failed.

result

result object

Job review result. This parameter is available when the job status is succeeded.

request_params

request_params object

Parameters for creating the job

create_time

String

Time when the job was created

update_time

String

Time when the job was updated

request_id

String

Unique ID of the request, which is used for troubleshooting. You are advised to save the ID.

Minimum length: 2

Maximum length: 64

Table 4 result

Parameter

Type

Description

suggestion

String

Whether the audio clip passes the check

  • block: It contain sensitive information and fail to pass the check.
  • pass: It does not contain sensitive information and passes the check.
  • review: It need to be manually reviewed.

details

Array of details objects

Review details

audio_text

String

Audio text

Table 5 details

Parameter

Type

Description

start_time

Float

Start time of the audio clip

suggestion

String

Suggestion for moderating the audio clip

  • block: It contain sensitive information and fail to pass the check.
  • review: It need to be manually reviewed.

end_time

Float

End time of the audio clip

label

String

Audio clip label. The options are as follows:

  • terrorism: terrorism-related information
  • porn: pornographic information
  • ban: banned information
  • abuse: abuse
  • ad: advertisement
  • ad_law: information that violates the advertisement law
  • moan: moan
  • meaningless: meaningless information

audio_text

String

Text of the audio clip

segments

Array of segments objects

List of hit risk segments. This field is unavailable if semantic algorithm models are hit.

Table 6 segments

Parameter

Type

Description

segment

String

Hit risk segment

Table 7 request_params

Parameter

Type

Description

event_type

String

Parameter event_type for creating the job

data

data object

Parameter data for creating the job

callback

String

Parameter callback for creating the job

categories

Array of strings

Parameter categories for creating the job

Table 8 data

Parameter

Type

Description

url

String

Parameter url for creating the job

Status code: 400

Table 9 Response body parameters

Parameter

Type

Description

error_code

String

Error code of a failed API call. For details, see Error Codes.

This parameter is not included when the API is successfully called.

error_msg

String

Error message of a failed API call.

This parameter is not included when the API is successfully called.

Example Request

NOTE:

endpoint is the request URL for calling an API. Endpoints vary depending on services and regions. For details, see Endpoints.

For example, if the service is deployed in the CN North-Beijing4 region, the endpoint is moderation.cn-north-4.myhuaweicloud.com and the request URL is https://moderation.cn-north-4.myhuaweicloud.com/v3/{project_id}/moderation/audio/jobs/{job_id}. For details about how to obtain the project ID, see Obtaining a Project ID. job_id is the job ID returned when the job is created successfully.

GET https://{endpoint}/v3/{project_id}/moderation/audio/jobs/{job_id} 

Example Response

Status code: 200

Job status and result returned when the query is successful

{ 
  "job_id" : "01655654400_ad96b30f58cc40e8968e53f1f1e80021", 
  "status" : "succeeded", 
  "result" : { 
    "suggestion" : "block", 
    "details" : [ { 
      "start_time" : 0, 
      "suggestion" : "block", 
      "end_time" : 10, 
      "label" : "porn", 
      "audio_text" : "xxxx", 
      "segments" : [ { 
        "segment" : "xxx" 
      }, { 
        "segment" : "xxx" 
      }, { 
        "segment" : "xxx" 
      } ] 
    }, { 
      "start_time" : 30, 
      "suggestion" : "block", 
      "end_time" : 40, 
      "label" : "porn", 
      "audio_text" : "xxx", 
      "segments" : [ { 
        "segment" : "xx" 
      } ] 
    } ], 
    "audio_text" : "xxxxxx" 
  }, 
  "request_params" : { 
    "event_type" : "default", 
    "data" : { 
      "url" : "https://xxxx.wav" 
    }, 
    "callback" : "http://xxx", 
    "categories" : [ "porn", "ad" ] 
  }, 
  "create_time" : "2022-06-20 11:05:29", 
  "update_time" : "2022-06-20 11:07:08", 
  "request_id" : "2419446b1fe14203f64e4018d12db3dd" 
}

Status code: 400

Error cause returned when the query fails

{ 
  "error_code" : "AIS.0030", 
  "error_msg" : "Job not found" 
}

Status Codes

Status Code

Description

200

Example of a successful response

400

Example of a failed response

Error Codes

For details, see Error Codes.

We use cookies to improve our site and your experience. By continuing to browse our site you accept our cookie policy. Find out more

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback