HTTP Commands for Controlling Livestreaming
Virtual avatar livestreaming can be taken over by humans using HTTP APIs. After the takeover by humans, the virtual avatar can speak as instructed by either of the following methods:
- By input text. Run INSERT_PLAY_SCRIPT to insert a script as the answer to be given by the virtual avatar. When the virtual avatar remains unchanged, so do the background. Its parameter structure is defined as PlayTextInfo.
- By input audio. Run INSERT_PLAY_AUDIO to insert an audio as the answer to be given by the virtual avatar. When the virtual avatar remains unchanged, so do the background. Its parameter structure is defined as PlayAudioInfo.
Commands for the API for controlling virtual avatar intelligent livestreaming:
- When the command is GET_CURRENT_PLAYING_SCRIPTS, the scripts of the current round are queried. Its response structure is defined as LivePlayingScriptList.
- When the command is CLEAN_UP_INSERT_COMMAND, unplayed insertion commands will be cleared. Its parameter structure is defined as CleanUpInsertCommand.
PlayTextInfo
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
text_config |
No |
Table 2 object |
Script configuration. |
play_type |
No |
String |
Playback mode. Options:
Default value: PLAY_NOW The value contains 0 to 32 characters. |
play_role |
No |
String |
Playback role. Options:
Default value: STREAMER The value contains 0 to 32 characters. |
rule_index |
No |
String |
When the interaction callback triggers the insertion of an audio reply, the index of the triggered interaction rule is carried. The value contains 0 to 64 characters. |
PlayAudioInfo
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
audio_url |
No |
String |
Audio URL. The value contains 0 to 2,048 characters. |
play_type |
No |
String |
Playback mode. Options:
Default value: APPEND The value contains 0 to 32 characters. |
play_role |
No |
String |
Playback role. Options:
Default value: STREAMER The value contains 0 to 32 characters. |
rule_index |
No |
String |
When the interaction callback triggers the insertion of an audio reply, the index of the triggered interaction rule is carried. The value contains 0 to 64 characters. |
LivePlayingScriptList
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
scene_scripts |
No |
Array of Table 5 |
Scripts. Array length: 1–100 |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
script_name |
No |
String |
Script name. The value contains 1 to 256 characters. |
model_asset_id |
No |
String |
Virtual avatar model asset ID. The value contains 0 to 64 characters. |
shoot_scripts |
No |
Array of Table 6 |
Video shooting scripts. Array length: 0–100 |
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot