gpt4 book ai didi

java - AWS Transcribe - 当我们看到 "IsPartial"标志设置为 False 时如何停止转录

转载 作者:行者123 更新时间:2023-12-01 17:28:49 25 4
gpt4 key购买 nike

当 AWS Transcribe 仍在进行流式传输时,isPartial 标志将设置为 True。我想在 isPartial 标志设置为 False 后停止流传输,该怎么做?

有人做过吗?

https://docs.aws.amazon.com/transcribe/latest/dg/transcribe-dg.pdf#streaming

这是 Json:

{
"TranscriptResultStream": {
"TranscriptEvent": {
"Transcript": {
"Results": [
{
"Alternatives": [
{
"Items": [
{
"Content": "the",
"EndTime": 0.3799375,
"StartTime": 0.0299375,
"Type": "pronunciation"
},
{
"Content": "amazon",
"EndTime": 0.5899375,
"StartTime": 0.3899375,
"Type": "pronunciation"
},
{
"Content": "is",
"EndTime": 0.7899375,
"StartTime": 0.5999375,
"Type": "pronunciation"
},
{
"Content": "the",
"EndTime": 0.9199375,
"StartTime": 0.7999375,
"Type": "pronunciation"
},
{
"Content": "largest",
"EndTime": 1.0199375,
"StartTime": 0.9299375,
"Type": "pronunciation"
}
],
"Transcrip`enter code here`t": "the amazon is the largest"
}
],
"EndTime": 1.02,
"IsPartial": true,
"ResultId": "2db76dc8-d728-11e8-9f8b-f2801f1b9fd1",
"StartTime": 0.0199375
}
]
}
}
}
}

最佳答案

空音频帧表示流结束。正如文档中所指定的:“要结束音频数据流,请在事件流编码消息中发送空音频 block ”。

关于java - AWS Transcribe - 当我们看到 "IsPartial"标志设置为 False 时如何停止转录,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61166121/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com