Updated on 2025-12-08 GMT+08:00

Querying Audio Training Resources

Function

Queries audio training resources.

Calling Method

For details, see Calling APIs.

Authorization Information

Each account has all the permissions required to call all APIs, but IAM users must be assigned the required permissions. For details about the required permissions, see Permissions Policies and Supported Actions.

URI

GET /v1/{project_id}/voice-training-manage/quotas

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.

Table 2 Query Parameters

Parameter

Mandatory

Type

Description

offset

No

Integer

Offset where the query starts.

Value range:

0~2147483647

Default value:

0

limit

No

Integer

Number of items displayed on each page.

Value range:

1~100

Default value:

10

Request Parameters

Table 3 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

No

String

User token. This parameter is mandatory when token authentication is used.

You can obtain the token by calling the IAM API used to obtain a user token.

Value of X-Subject-Token in the response header.

Authorization

No

String

Authentication information. This parameter is mandatory for AK/SK authentication.

X-Sdk-Date

No

String

Time when the request is sent. This parameter is mandatory for AK/SK authentication.

The format is YYYYMMDD'T'HHMMSS'Z'.

Response Parameters

Status code: 200

Table 4 Response body parameters

Parameter

Type

Description

count

Integer

Total quantity of voice model training resources.

Value range:

0~1000000

resource_available_nums

ResourceAvailableNums object

Number of available resources of all types

resources

Array of VoiceTrainingResource objects

Voice model training resources.

Table 5 ResourceAvailableNums

Parameter

Type

Description

flexus

Integer

Flexus resource quantity.

Value range:

0~1000000

basic

Integer

Number of resources of the basic edition.

Value range:

0~1000000

middle

Integer

Number of resources of the advanced edition.

Value range:

0~1000000

middle_on_demand

Integer

Number of resources of the advanced edition in trial.

Value range:

0~1000000

advance

Integer

Number of resources of the premium edition.

Value range:

0~1000000

third_party_cmww

Integer

Number of Mobvoi resources.

Value range:

0~1000000

Table 6 VoiceTrainingResource

Parameter

Type

Description

operation_type

String

Resource operation. Options:

  • ADD: adding a resource

  • UPDATE: updating a resource

  • FREEZE: freezing a resource

  • UNFREEZE: enabling a resource

  • REBIND: re-binding a resource

resource_source

String

Resource source.

  • PURCHASED: purchased

  • SP_ALLOCATED: allocated by the SP

  • ADMIN_ALLOCATED: allocated by the administrator

NOTE:
PURCHASED includes enabling pay-per-use, purchasing a pay-per-use package, one-off resources, and yearly/monthly resources.

asset_id

String

Asset ID.

resource_id

String

Resource ID.

resource_nums

Integer

Resource quantity. Number of voice models for training.

Value range:

0~1000000

resource_available_nums

Integer

Available resource quantity. Number of voice models available for training.

Value range:

0~1000000

resource_type

String

Resource type. Options:

  • BASIC: basic edition

  • MIDDLE: advanced edition

  • ADVANCE: premium edition

  • THIRD_PARTY: third-party DupDub

  • THIRD_PARTY_LJZN: third-party AudioX

  • TTS_CMWW: TTS resource

  • TTS_LJZN: AudioX TTS resource

  • FLEXUS: Flexus resource

charge_mode

String

Resource billing type.

  • ON_DEMAND: pay-per-use billing. Currently, this billing mode is only applicable to the advanced edition, allowing a maximum of three tasks.

  • PERIODIC: yearly/monthly billing

  • ONE_TIME: one-off billing

NOTE:
  • One-off billing includes one-off resources purchased by tenants and those allocated by the SP administrator to tenants.

expire_time

String

Resource expiration time. The format complies with RFC 3339, for example, 2021-01-10T08:43:17Z.

status

Integer

Resource status.

Value range:

0~1

Status code: 400

Table 7 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error description.

Example Requests

GET https://metastudio.cn-east-3.myhuaweicloud.com/v1/6a6a1f8354f64dd9b9a614def7b59d83/voice-training-manage/quotas

{
  "resources" : [ {
    "resource_source" : "PURCHASED",
    "resource_id" : "efc5300ecdba4ea48d1ff13a9d907bc0"
  }, {
    "resource_source" : "PURCHASED",
    "resource_id" : "646682facddb4912976f19a4d61c6a91"
  } ]
}

Example Responses

None

Status Codes

Status Code

Description

200

Success.

400

Abnormal.

Error Codes

See Error Codes.