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
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

Uploading IVR Voice Files (importVoiceFile/upload)

Updated on 2023-09-27 GMT+08:00

Scenario

Upload IVR voice files.

This interface has a performance limit. After 10 requests are sent per second, traffic control is performed. If the number of requests exceeds the limit, the requests fail.

Method

POST

URI

https://Domain name/apiaccess/rest/cc-management/v1/importVoiceFile/upload. For example, the domain name is service.besclouds.com.

Request Description

Table 1 Request header parameters

No.

Parameter

Type

Mandatory or Not

Description

1

Authorization

String

Yes

Authentication field. The format is Bearer {Value of AccessToken returned by the tokenByAkSk interface}. (A space is required after Bearer.)

2

X-APP-Key

String

No

App key field, which is the user ID. Contact the operation personnel to obtain the app key.

Table 2 Request body parameters

No.

Parameter

Type

Mandatory or Not

Description

1

body

Object

No

-

1.1

fileInfo

String

Yes

Base64-encoded recording file information. The maximum size is 8 MB. The size of the uploaded file increases the upload time.

1.2

locale

String

Yes

Language of the recording file. The value can be zh_CN (Chinese), en_US (English), pt_BR (Portuguese), or th_TH (Thai).

1.3

voiceType

String

Yes

Voice type. 0 indicates IVR, 1 indicates prompt tone, 2 indicates fault tone, and 3 indicates voice notification.

1.4

fileType

String

Yes

File type. WAV and MP3 files are supported.

The FFmpeg tool is used to transcode the WAV and MP3 formats to the audio file formats supported by the platform (A-law compression algorithm, mono, sampling bit: 8 bits, sampling frequency: 8000 Hz). After the conversion, the audio quality may be affected and audio file data may be lost. You are advised to use an audio file format that is supported by the platform.

1.5

callBackUrl

String

No

Callback URL. The system returns the review result to this URL.

The callback URL indicates the API defined by the customer for receiving the system review result. For details about the request and response parameters, see Table 3.

1.6

voiceFileName

String

No

IVR voice name. The value can contain a maximum of 50 characters, including only Chinese characters, uppercase letters, lowercase letters, and digits.

Table 3 Callback URL parameters

No.

Parameter

Type

Mandatory or Not

Description

Request parameters

1.5.1

fileUrl

String

Yes

Address of the file to be reviewed. The value is a full file address, including the file name extension.

1.5.2

fileId

String

Yes

ID of the file to be reviewed. For details about how to set this parameter, see the description of the fileId parameter in Table 4.

1.5.3

status

String

Yes

  • File review status. The options are as follows:
    • 2: approved
    • 3: rejected

1.5.4

comment

String

No

Review status remarks.

Response parameters

1.5.5

returnCode

String

Yes

Response code. The options are as follows:
  • 0: The review result is received successfully.
  • Others: The review result fails to be received.
    NOTE:

    If the review result fails to be received, the callback API is repeatedly invoked to return the file review result. After six times, the file review result is no longer returned.

Response Description

  • Status code: 200
    Table 4 Response body parameters

    No.

    Parameter

    Type

    Mandatory or Not

    Description

    1

    schema

    Object

    Yes

    -

    1.1

    returnCode

    String

    Yes

    Result code. The value 0 indicates success, and other values indicates failure.

    1.2

    description

    String

    Yes

    Result description.

    1.3

    fileId

    String

    No

    ID generated after the voice file is uploaded, which is used to associate with the recording in the AICC.

  • Status code: 404

    The requested content is not found. Check the request path.

  • Status code: 500

    Business failure. Check the values of parameters in the request.

Error Codes

None

Example

Request header:

Content-Type:application/json
Authorization:Bearer XXXXXXXXXXXXXXXXXXXXXXX
X-APP-Key:XXXXXXXXXXXXXXXXXXXXXXX

Request parameters:

{
	"locale" : "en_US",
	"voiceType" : "0",
	"fileType" : "wav",
	"callBackUrl" : "http://10.130.40.194:18133/upload",
	"fileInfo" : 
"UklGRjJ+AABXQVZFZm10IBIAAAAGAAEAQB8AAEAfAAABAAgAAABkYXRhAH4AANXV1dXV1dXV1dXV1dXV1dXV1dXV1dXV1dXV1dXV1dXV1dXV1"
}

Response parameters:

{
  "returnCode": "0",
  "description": "File uploaded successfully.",
  "fileId": "1182733043937561608"
}

Callback URL parameters:

//Request parameters
{
    "fileUrl": "Y:/IVR/147/voice/0/nPqV9vU3_1666706957559.wav",
    "fileId": "1323606152730207249",
    "status": "2",
    "comment": "Approved"
}
//Response parameters
{
    "returnCode": "0"
}

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