syntax = "proto3"; | |
package Agora.SpeechToText; | |
option objc_class_prefix = "Stt"; | |
option csharp_namespace = "AgoraSTTSample.Protobuf"; | |
option java_package = "io.agora.rtc.speech2text"; | |
option java_outer_classname = "AgoraSpeech2TextProtobuffer"; | |
message Text { | |
int32 vendor = 1; | |
int32 version = 2; | |
int32 seqnum = 3; | |
int64 uid = 4; | |
int32 flag = 5; | |
int64 time = 6; | |
int32 lang = 7; | |
int32 starttime = 8; | |
int32 offtime = 9; | |
repeated Word words = 10; | |
bool end_of_segment = 11; | |
int32 duration_ms = 12; | |
string data_type = 13; // transcribe ,translate | |
repeated Translation trans = 14; | |
string culture = 15; | |
} | |
message Word { | |
string text = 1; | |
int32 start_ms = 2; | |
int32 duration_ms = 3; | |
bool is_final = 4; | |
double confidence = 5; | |
} | |
message Translation { | |
bool is_final = 1; | |
string lang = 2; // 翻译语言 | |
repeated string texts = 3; | |
} | |