沃森语音到文本的响应时间 [英] Watson Speech to Text Response Times
问题描述
在推送到Bluemix时服务出现问题
Having some troubles with the service while pushing to Bluemix
我通过php-curl发送的推送请求是:
The push request I am sending via php-curl is:
POST https://stream.watsonplatform.net/speech-to -text/api/v1/识别
具有以下参数
型号:zh-CN_NarrowbandModel
内容类型:音频/音频;速度:8000
传输编码:分块
时间戳记:true
word_confidence:正确
连续:true
model : en-US_NarrowbandModel
Content-Type : audio/wav; rate: 8000
Transfer-Encoding: chunked
timestamps : true
word_confidence : true
continuous : true
响应超时设置为2h(7200000毫秒)
Response timeout is set to 2h (7200000 milliseconds)
对于某些文件,我们正在从卷发超时,起初我没有想到任何原因,起初我以为与录音的持续时间有关,但是我已经成功记录了约200秒的音频文件请求和录制超时129秒.
We are getting timeout from curl for some of our files, without any apparent reason, at first I thought was related to the duration of the recordings, but I've got in logs with successful requests for audio files ~200 seconds long and timeouts for recordings 129 seconds.
我认为这可能是超时问题或音频文件上传中的某些错误,所以我开始研究会话,但是我不清楚会话过程如何工作,因此无法在文档中进行整理.
I thought it may be a timeout problem or some errors in the audio file upload, so I started looking into the sessions but it is unclear to me how to the session process works and I cant sort it out in the documentation.
以下文档( https://www.ibm.com/smarterplanet/us/en/ibmwatson/developercloud/speech-to-text/api/v1/)
如果能得到一些反馈/对我做错的事情提出建议,我将感到非常高兴...
I would be really glad if I can get some feedback / advise on what I am doing wrong...
谢谢...
推荐答案
如果您提交的文件很长,那么即使您使用会话,REST接口也可能会导致超时.通常,我建议您尝试使用Watson语音转文本服务的WebSockets接口.该接口也比带有会话的REST接口简单得多,并且超时应该没有任何问题.如果您的文件包含很长的静默时间,请不要忘记将inactivity_timeout参数设置为更高的值,例如600.
If the file that you are submitting is long then the REST interface may result in timeouts, even if you use sessions. In general, I recomend you to try the WebSockets interface to the Watson Speech To Text service. This interface is also a lot simpler than the REST interface with sessions, and you should not have any problem with timeouts. If your file contains very long silences please do not forget to set the inactivity_timeout parameter to a higher value, for example 600.
文档在这里:
https://www.ibm.com/smarterplanet/us/en/ibmwatson/developercloud/doc/speech-to-text/websockets.shtml
一个简单的python工作示例在这里:
A simple working example in python is here:
https://github.com/watson-developer- cloud/speech-to-text-websockets-python
丹妮
这篇关于沃森语音到文本的响应时间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!