google-api - Google Speech to Text API 很慢
问题描述
我在这里使用“使用 Google 云存储文件转录长音频文件”的指南。
但是使用“enable_automatic_punctuation”的“增强视频”模型时速度很慢。每 10 分钟的音频持续时间大约需要 2.5 分钟。
这是我的配置:
config = speech.RecognitionConfig(
encoding=speech.RecognitionConfig.AudioEncoding.FLAC,
audio_channel_count=2,
language_code="en-US",
use_enhanced=True, # Use enhanced model.
model='video', # Enhanced model for videos
enable_word_time_offsets=True, # Add the word video times (seconds)
enable_automatic_punctuation=True # Add punctuation to the transcript.
)
operation = client.long_running_recognize(config=config, audio=audio)
有什么方法可以让我们得到更快的响应。对于 10 分钟持续时间的音频文件,语音识别模型 + NLP 标点符号模型真的需要这么长时间吗? 2 分钟?
解决方案
推荐阅读
- javascript - 让 CSS 按钮在单击时变为绿色并保持绿色
- mysql - 当条件不满足时,MySQL Force 'WHERE' 显示 null
- python - TensorFlow 的正则化器中的 scale 代表什么?
- visual-studio-code - 在“/Users/userName”中找不到名为“pubspec.yaml”的文件
- ios - 在 SWIFT 4 中将 JSON 数据移出本地范围
- django - Django:inlineformset '属性没有与之关联的文件' 错误
- mariadb - Mariadb 10.3.8:从 MariaDB 存储库安装,缺少文件?
- android - Android:从 AsyncTask 请求位置权限
- c++ - 如何在 C++ 中使用 libcurl 发送和接收 POST 请求?
- html - VBA网页抓取代码错误与宏链接