Reputation: 1220
I want to integrate speech to text in electron desktop application with live streaming without generating .mp3 file locally or you can say directly streaming from microphone to google cloud speech.
I found article on google cloud website that is here. (in last where it say SoX needs to be installed).
It has a pretty confusing requirement that SoX needs to be installed in machine.
But when i wrap my electron application and distribute it to the world, then it's not necessary that everyone will install SoX. So how can i integrate it or can i install SoX on everyone's PC when they are going to install my application because as documentation says SoX is must. Is there any way around for it?
Upvotes: 0
Views: 448
Reputation: 15266
If we look at the last sample written in node.js in the page you linked, we see that it uses a module called "node-record-lpcm16" which is not part of GCP. If we read on down we find a call to record.start(). The purpose of this is to source an input stream of data (presumably from the microphone). It is my understanding that when we study the article on transcribing speech to text we see that GCP doesn't care about where the audio source comes from and it is up to your own application where to source it from. The sample illustrates just one possible technique using SoX but there are others such as "arecord" and likely more. I think what we need to do is separate the notion of sourcing the audio input from the GCP capabilities of processing the stream of audio input. As such, I do not believe that speech to text from GCP requires SoX but rather your application that obtains audio data must obtain that data from somewhere before passing it to GCP and SoX is one possible option.
Upvotes: 1