Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Managed Threat Detection
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive

Pushing Live Captions

Updated on 2025-02-10 GMT+08:00

Description

Anyone in a meeting can use this API to enable live captions of the meeting for the first time. When live captions are enabled, everyone in the meeting can subscribe to the message frame for pushing live captions.

Live captions stop only when the meeting ends.

Table 1 Request text

Parameter

Type

Description

action

String

Message type. The value must be ConfControl.

sequence

String

Message sequence, which uniquely identifies a message frame.

type

String

Meeting control type. The value must be REALTIMESUBTITLE.

data

String

For details about the request JSON character string, see Table 2.

Table 2 Data structure of data

Parameter

Mandatory

Type

Description

conferenceID

Yes

String

Meeting ID.

confToken

Yes

String

Meeting control token.

isSubtitle

No

Integer

0: Disable live captions.

1: Enable live captions.

subtitleType

No

Integer

Caption display mode.

0: captions of two loudest speakers.

sisProperty

No

String

Model used.

chinese_16k_general: Mandarin Chinese (default).

chinese_16k_trial: trial mode.

id

No

Array of strings

This parameter is mandatory when captions of specific speakers are displayed. List of speaker IDs (pid in Pushing Online Participant Information). Up to four speakers are supported.

Table 3 Message frame for pushing live captions

Parameter

Type

Description

action

String

"RealTimeSubtitleNotify"

version

String

For a full message, the value is the timestamp (in milliseconds) when the message is generated.

For an incremental message, the value is a sequence number in ascending order.

createTime

String

Timestamp when a message is generated, in milliseconds.

msgID

String

Unique message ID.

msgMode

Integer

Message mode.

0: full message.

1: incremental message.

confID

String

ID of the subscribed-to meeting.

data

SubtitleData object

Live caption information. The content is negotiated between the live caption service and terminal. For details, see the SubtitleData data structure.

Table 4 SubtitleData data structure

Parameter

Type

Description

msgs

Msgs<0..*>

Caption content. For details, see Table 5.

isFinal

Boolean

Whether to break a sentence.

timestamp

Integer

Timestamp.

beginTime

Integer

Caption start time.

endTime

Integer

Caption end time.

participantID

String

Participant ID.

Table 5 Msgs data structure

Parameter

Type

Description

subtitleLang

String

Language.

Original: original language.

Mandarin

English

translateText

String

Caption text.

id

String

Caption message ID.

Example of Enabling Live Captions

var confToken = Obtaining a Meeting Control Token;
var openRealTimeSubtitle = JSON.stringify({
    sequence: "000000000000000002611382273463",
    action: "ConfControl",
    type: "REALTIMESUBTITLE",
    data: JSON.stringify({
        conferenceID: "986812232",
        confToken: confToken,
        isSubtitle: "1",
        subtitleType: "0"
    }),
 });

Example of Pushing Live Captions

{
	"action": "RealTimeSubtitleNotify",
	"version": "1614936396556",
	"createTime": "1614936396556",
	"msgID": "e20544e37d9411ebbae3fd5b302953d3",
	"msgMode": 0,
	"confID": "981112355",
	"data": {
		"msgs ": [{
			"subtitleLang": "Mandarin",
			"translateText": "Live captions.",
			"id ": "c0196fb9-c9c3-47ba-a685-05223552de2f"
		}],
		"isFinal ": false,
		"timestamp ": 1614936396553,
		"beginTime": 1528680,
		"endTime": 1530900,
		"participantID": "984r8z9f4p6p6pry97yfan6z76681f09"
	}
}

We use cookies to improve our site and your experience. By continuing to browse our site you accept our cookie policy. Find out more

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback