RTSA Commands for Controlling Livestreaming
The RTSA commands for controlling livestreaming are described as follows:
Virtual Avatar Livestreaming Status Changes
Figure 1 shows how the virtual avatar livestreaming status changes.
The flowchart is described as follows:
- PREPROCESSING: The image model loading starts on MetaStudio.
- PLAY_READY: The image model has been loaded. In this case, the virtual avatar is in a silent status, and waits for an instruction to start reading the script.
- PROCESSING: working status of a virtual avatar. The virtual avatar livestreams as instructed by the text or audio preset in the livestreaming task.
- PLAY_PAUSE: The virtual avatar livestreaming is paused. In this case, the virtual avatar is in a silent status, and waits for an instruction to resume reading the script.
- TAKE_OVER: The livestreaming task is taken over by a human. MetaStudio obtains the audio of the stream from the RTC channel and controls the virtual avatar livestreaming in real time.
- PLAY_END: The livestreaming task ends.
RTSA Command Definition
- The RTC User Render user sends a server status notification through the COMMAND channel.
Code example:
{ "message_type" : "state_notify", "state" : "PREPROCESSING", }
In the preceding code, state indicates the livestreaming task status. The options are as follows:
- PREPROCESSING: The livestreaming task is being prepared.
- PLAY_READY: The livestreaming task is ready. The virtual avatar remains silent and waits for an instruction to start reading the script.
- PROCESSING: The livestreaming task is ongoing.
- PLAY_PAUSE: The virtual avatar stops speaking and remains silent.
- TAKE_OVER: The livestreaming task is being taken over by a human.
- PLAY_END: The livestreaming task ends.
- The streamer can send an instruction for livestreaming control.
{ "message_type" : "live_control", "command" : "play_start", "params" : { "timing" : "NOW", } }
The parameters are described as follows:
- command: instruction for livestreaming control. The options are as follows:
- get_current_state: obtaining the status of the current livestreaming task
- play_start: The virtual avatar starts reading the script.
- play_pause: The virtual avatar pauses the script reading and remains silent.
- play_resume: The virtual avatar resumes reading the script.
- voice_start: starting the real-time virtual avatar voice playback
- voice_end: ending the real-time virtual avatar voice playback
- timing: time when an instruction for livestreaming control is executed. The options are as follows:
- NOW: The instruction is executed immediately.
- SENTENCE_END: The current instruction is executed after the virtual avatar finishes reading a complete sentence.
- command: instruction for livestreaming control. The options are as follows:
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