Edit a Custom Prompt
Update a custom prompt generated via text-to-speech (TTS).
Request URL
POST {base_url}/{api_path}/custom_prompt/update?access_token={access_token}
Request parameters
| Parameter | Required | Type | Description |
|---|---|---|---|
| id | Yes | Integer | The ID of the custom prompt. Note: You can query the
prompt ID using Search Custom Prompts. |
| file | No | String | The filename of the prompt. Note:
|
| text | No | String | The text used to generate prompt. Note:
|
| language | No | String | The language code used for TTS (e.g., "en-US" or
"zh-CN"). Note: The language must be
supported
by the vendor set in asr_manufacturer. |
| asr_manufacturer | No | String | The TTS vendor. Valid value:
|
| voice_id | No | String | The ID of the voice profile. |
| speed | No | Integer | The speech rate. Note: A number from 1 to 100 is
allowed. |
| volume | No | Integer | The volume. Note: A number from 1 to 100 is
allowed. |
| pitch | No | Integer | The pitch. Note: A number from 1 to 100 is
allowed. |
Response parameters
| Parameter | Type | Description |
|---|---|---|
| errcode | Integer | Returned error code.
Note: You can check the error code and
error message in Error Code and Error Message.
|
| errmsg | String | Returned message.
|
Example
Request example
POST /openapi/v1.0/custom_prompt/update?access_token=gwakjgu9ZBUfz36wql4ndsVKkryI0kdj HTTP/1.1
Host: 192.168.5.150:8088
Content-Type: application/json
{
"id": 37,
"file": "doc_demo_prompt_v2"
}
Response example
HTTP/1.1 200 OK
{
"errcode": 0,
"errmsg": "SUCCESS"
}