Watson Speech to Text Response Times

匿名 (未验证) 提交于 2019-12-03 02:33:02

问题:

Having some troubles with the service while pushing to Bluemix

The push request I am sending via php-curl is:

POST https://stream.watsonplatform.net/speech-to-text/api/v1/recognize

with the following parameters






Response timeout is set to 2h (7200000 milliseconds)

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.

Following 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...

Thanks...

回答1:

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.

The documentation is here:

https://www.ibm.com/smarterplanet/us/en/ibmwatson/developercloud/doc/speech-to-text/websockets.shtml

A simple working example in python is here:

https://github.com/watson-developer-cloud/speech-to-text-websockets-python

Dani



标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!