雾聪
2023-12-18 9256fc69e60468731a8c0a94b262025c54b102a7
update websocket_protocol
2个文件已修改
12 ■■■■■ 已修改文件
runtime/docs/websocket_protocol.md 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
runtime/docs/websocket_protocol_zh.md 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
runtime/docs/websocket_protocol.md
@@ -36,7 +36,7 @@
#### Sending Recognition Results
The message (serialized in JSON) is:
```text
{"mode": "offline", "wav_name": "wav_name", "text": "asr ouputs", "is_final": True, "timestamp":"[[100,200], [200,500]]"}
{"mode": "offline", "wav_name": "wav_name", "text": "asr ouputs", "is_final": True, "timestamp":"[[100,200], [200,500]]", "stamp_sents":""}
```
Parameter explanation:
```text
@@ -45,6 +45,7 @@
`text`: the text output of speech recognition
`is_final`: indicating the end of recognition
`timestamp`:If AM is a timestamp model, it will return this field, indicating the timestamp, in the format of "[[100,200], [200,500]]"
`stamp_sents`:If AM is a timestamp model, it will return this field, indicating the stamp_sents, in the format of "[{'text':'正 是 因 为','start':'430','end':'1130','ts_list':[[430,670],[670,810],[810,1030],[1030,1130]]}]"
```
## Real-time Speech Recognition
@@ -84,7 +85,7 @@
The message (serialized in JSON) is:
```text
{"mode": "2pass-online", "wav_name": "wav_name", "text": "asr ouputs", "is_final": True, "timestamp":"[[100,200], [200,500]]"}
{"mode": "2pass-online", "wav_name": "wav_name", "text": "asr ouputs", "is_final": True, "timestamp":"[[100,200], [200,500]]", "stamp_sents":""}
```
Parameter explanation:
```text
@@ -93,4 +94,5 @@
`text`: the text output of speech recognition
`is_final`: indicating the end of recognition
`timestamp`:If AM is a timestamp model, it will return this field, indicating the timestamp, in the format of "[[100,200], [200,500]]"
`stamp_sents`:If AM is a timestamp model, it will return this field, indicating the stamp_sents, in the format of "[{'text':'正 是 因 为','start':'430','end':'1130','ts_list':[[430,670],[670,810],[810,1030],[1030,1130]]}]"
```
runtime/docs/websocket_protocol_zh.md
@@ -37,7 +37,7 @@
#### 发送识别结果
message为(采用json序列化)
```text
{"mode": "offline", "wav_name": "wav_name", "text": "asr ouputs", "is_final": True,"timestamp":"[[100,200], [200,500]]"}
{"mode": "offline", "wav_name": "wav_name", "text": "asr ouputs", "is_final": True,"timestamp":"[[100,200], [200,500]]","stamp_sents":""}
```
参数介绍:
```text
@@ -46,6 +46,7 @@
`text`:表示语音识别输出文本
`is_final`:表示识别结束
`timestamp`:如果AM为时间戳模型,会返回此字段,表示时间戳,格式为 "[[100,200], [200,500]]"(ms)
`stamp_sents`:如果AM为时间戳模型,会返回此字段,表示句子级别时间戳,格式为 "[{'text':'正 是 因 为','start':'430','end':'1130','ts_list':[[430,670],[670,810],[810,1030],[1030,1130]]}]"
```
## 实时语音识别
@@ -86,7 +87,7 @@
#### 发送识别结果
message为(采用json序列化)
```text
{"mode": "2pass-online", "wav_name": "wav_name", "text": "asr ouputs", "is_final": True, "timestamp":"[[100,200], [200,500]]"}
{"mode": "2pass-online", "wav_name": "wav_name", "text": "asr ouputs", "is_final": True, "timestamp":"[[100,200], [200,500]]","stamp_sents":""}
```
参数介绍:
```text
@@ -95,4 +96,5 @@
`text`:表示语音识别输出文本
`is_final`:表示识别结束
`timestamp`:如果AM为时间戳模型,会返回此字段,表示时间戳,格式为 "[[100,200], [200,500]]"(ms)
`stamp_sents`:如果AM为时间戳模型,会返回此字段,表示句子级别时间戳,格式为 "[{'text':'正 是 因 为','start':'430','end':'1130','ts_list':[[430,670],[670,810],[810,1030],[1030,1130]]}]"
```