Google Speech to Text 的 25 秒延迟 [英] 25s Latency in Google Speech to Text

查看:61
本文介绍了Google Speech to Text 的 25 秒延迟的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是我在使用 Google Speech to Text Engine 时遇到的问题.我目前正在以 32kB 块实时流式传输 16 位/16 kHz 音频.但是在发送音频和接收转录之间平均有 25 秒的延迟,这违背了实时转录的目的.

This is a problem I ran into using the Google Speech to Text Engine. I am currently streaming 16 bit / 16 kHz audio real time in 32kB chunks. But there is an average 25 second latency between sending audio and receiving transcripts, defeating the purpose of real time transcription.

为什么会有这么高的延迟?

Why is there such high latency?

推荐答案

Google Speech to Text 文档 建议使用 100 毫秒的帧大小来最小化延迟.

The Google Speech to Text documentation recommends using a 100 ms frame size to minimize latency.

32kB *(8 位/1 字节)*(1 个样本/16 位)*(1 秒/16000 个样本)= 1 秒.

32kB * (8 bits / 1 byte) * ( 1 sample / 16 bits ) * (1 sec / 16000 samples ) = 1 sec.

所以尝试发送 3.2kB 块.这将平均延迟从 25 秒降至约 4 秒.

So try sending 3.2kB chunks instead. That dropped average latency from 25s to ~4s.

这篇关于Google Speech to Text 的 25 秒延迟的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆