RTSA Commands for Controlling Livestreaming
The RTSA commands for controlling livestreaming are described as follows:
Virtual Human Livestreaming Status Changes
Figure 1 shows how the virtual human 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 human is in a silent status, and waits for an instruction to start playing the script.
- PROCESSING: working status of a virtual human. The virtual human livestreams as instructed by the text or audio preset in the livestreaming task.
- PLAY_PAUSE: The virtual human livestreaming is paused. In this case, the virtual human is in a silent status, and waits for an instruction to resume playing 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 human 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 human remains silent and waits for an instruction to start playing the script.
- PROCESSING: The livestreaming task is ongoing.
- PLAY_PAUSE: The virtual human 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 human starts playing the script.
- play_pause: The virtual human pauses the script playback and remains silent.
- play_resume: The virtual human resumes playing the script.
- voice_start: starting the real-time virtual human voice playback
- voice_end: ending the real-time virtual human 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 human speaks 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