How to proceed multiple streamingRecognize request in Google Speech-to-Text API?

275 views
Skip to first unread message

Tom Chiang

unread,
Feb 19, 2020, 9:53:50 PM2/19/20
to Google App Engine

I have built a web based Speech-to-Text application with Google Speech-to-Text API.

The application flow:
  1. Get audio stream from browser 
  2. Stream audio data to a speech recognition service and get real time results as our user talks

0_MJ6ydPicL3CrJ6zg.png


I have referenced the sample code in my application, the streamingRecognize request works perfectly with a signal client call, and my server can receive the interim-transcription result from Google Speech API. However, when there are more then one client call streamingRecognize simultaneously, Google Speech API will get stuck. So, may I know how to handle more than one streamingRecognize request concurrently? Do I need to create another client to process the second streamingRecognize request? Thanks.
   
Back-end server specifications:
  • NodeJS
  • Socket.io
0_MJ6ydPicL3CrJ6zg.png

Fabio Santos

unread,
Feb 20, 2020, 12:58:36 PM2/20/20
to Google App Engine
Wow, this is pretty recent, I'm also on the same boat right. Everything working flawlessly except for this, I might have to create a JS Object like {[userKey]: new speech.SpeechClient} as to add all users as they need to talk.

Tom Chiang

unread,
Feb 20, 2020, 11:22:27 PM2/20/20
to Google App Engine
Umm... So it this the only way to archive the goal by implementing like this?
eval("var " + myString + " = new speech.SpeechClient();");



Fabio Santos於 2020年2月21日星期五 UTC+8上午1時58分36秒寫道:
Reply all
Reply to author
Forward
0 new messages