SmartCall
Intelligent Speech Interaction is a human-machine interaction technology that enables users to hold natural, voice-based conversations with machines.
Operation description
You can use SmartCall with the Smart Outbound Call HTTP Callback Interface. After the voice platform initiates a call, it sends the transcribed speech text to your business system. Your business system then returns the next action to the voice platform.
The following characters are not allowed in SmartCall callbacks:
@ = : "" $ { } ^ * ¥.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
dyvms:SmartCall |
none |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| CalledShowNumber |
string |
Yes |
Displayed number for the called party. This must be a number you have purchased. Log on to the Voice Service console. Go to Voice Numbers > Real Number Management to view your purchased numbers. |
0571****5678 |
| CalledNumber |
string |
Yes |
Called number. Only numbers from the Chinese mainland are supported. |
1590****0000 |
| VoiceCode |
string |
Yes |
Voice file for smart outbound calls. If the voice file is uploaded to the console, set VoiceCode to the voice ID of the file. Log on to the Voice Service console. Go to Voice File Management > Intelligent Speech Interaction Voice Files. Click Details to view the voice ID. |
2d4c-4e78-8d2a-afbb06cf****.wav,$name$ |
| RecordFlag |
boolean |
No |
Whether to record the call. Valid values:
|
true |
| Volume |
integer |
No |
Volume for playing audio. Valid values: -4 to 4. We recommend setting this to 1. |
1 |
| Speed |
integer |
No |
This parameter is not supported. |
1 |
| AsrModelId |
string |
No |
The Automatic Speech Recognition (ASR) model. The valid values are:
Note
When you call the SmartCall operation, you can specify the ASR model by setting either the AsrModelId or AsrBaseId parameter.
|
customer_service_8k |
| PauseTime |
integer |
No |
Pause duration. Sets how long a user must pause before the system treats it as the end of a sentence. Unit: milliseconds. Valid values: 300 to 1200. Note
|
800 |
| MuteTime |
integer |
No |
Mute duration. Sets how long a user must remain silent before the call ends. Unit: milliseconds. Valid values: 1000 to 20000. Note
|
10000 |
| ActionCodeBreak |
boolean |
No |
Whether the current media file can be interrupted. Default value: true. If this is false, the current playback cannot be interrupted—even if the next action (action_break) is true. Note
action_code_break has higher priority than action_break. |
true |
| OutId |
string |
No |
ID reserved for the caller. This ID is returned to the caller in the callback message. String. Length: 1 to 15 bytes. |
342268***** |
| DynamicId |
string |
No |
Dynamic extension ID reserved for the caller. Returned in the callback URL for developer identification. |
abcdefgh |
| EarlyMediaAsr |
boolean |
No |
Early media speech recognition flag. Valid values:
Note
Set this to true to record why the call was not answered. |
true |
| VoiceCodeParam |
string |
No |
TTS parameter string in JSON format. Must match the TTS parameters in VoiceCode. |
{"name":"喂,你好"} |
| SessionTimeout |
integer |
No |
Maximum call duration. The call ends automatically after this time. Unit: seconds. Note
Maximum duration is 3600 seconds. |
120 |
| ActionCodeTimeBreak |
integer |
No |
Interrupt based on continuous speech duration. Unit: milliseconds. If ActionCodeBreak is true, continuous speech interrupts the current playback. If this parameter is not set or is 0, it does not take effect. |
120 |
| TtsStyle |
string |
No |
Voice style for TTS variables. Default value: xiaoyun. For a full list, see Voice Styles. |
xiaoyun |
| TtsVolume |
integer |
No |
Volume for playing TTS variables. Valid values: 0 to 100. Default value: 0. |
10 |
| TtsSpeed |
integer |
No |
Speech speed for TTS variables. Valid values: -200 to 200. Default value: 0. |
100 |
| TtsConf |
boolean |
No |
Whether to configure TTS voice settings. Valid values:
|
true |
| AsrBaseId |
string |
No |
ASR foundation model. Valid values:
Note
When you call the SmartCall API, specify an ASR model. Set either AsrModelId or AsrBaseId, but not both.
|
customer_service_8k |
| StreamAsr |
integer |
No |
Streaming ASR. Uses the first few spoken words to infer meaning. Valid values:
|
1 |
| BackgroundFileCode |
string |
No |
Background voice file ID played during user-robot conversations. Log on to the Voice Service console. Go to Voice File Management > Intelligent Speech Interaction Voice Files. Click Details to view the voice ID. |
2d4c-4e78-8d2a-afbb06cf****.wav |
| BackgroundVolume |
integer |
No |
This parameter is not supported. |
1 |
| BackgroundSpeed |
integer |
No |
This parameter is not supported. |
1 |
| EnableITN |
boolean |
No |
Whether to apply inverse text normalization (ITN) during post-processing. Default value: false. If set to true, Chinese numerals convert to Arabic numerals in output. |
false |
| NoiseThreshold |
number |
No |
Voice Styles
For more information, see Voice Styles.
Response elements
|
Element |
Type |
Description |
Example |
|
object |
Response data. |
||
| Code |
string |
Request status code.
|
OK |
| Message |
string |
Description of the status code. |
OK |
| RequestId |
string |
Request ID. |
A90E4451-FED7-49D2-87C8-00700A8C4D0D |
| CallId |
string |
Unique receipt ID for this call. Use the QueryCallDetailByCallId API to query call details by CallId. |
116012854210^10281427**** |
Examples
Success response
JSON format
{
"Code": "OK",
"Message": "OK",
"RequestId": "A90E4451-FED7-49D2-87C8-00700A8C4D0D",
"CallId": "116012854210^10281427****"
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.