Language code detection of spoken language in Google Speech API

Viewed 2269

Is there an option to automatically detect the spoken language using Google Cloud Platform Machine Learning's Speech API?

https://cloud.google.com/speech/docs/languages indicates the list of the languages supported. However, the user needs to manually set this parameter to perform speech-to-text. I'd like to do this automatically.

3 Answers

Google does not provide direct api for spoken language detection, So it can be implemented using the following steps, although its not 100% accurate:-

1.Use google speech api to convert voice to text.

2.send the spoken voice to api one by one with both the selected language codes.

3.In the response of api it give the value of confidence and number of alternatives.

4.compare the value of confidence of both the output and use the one with the greater value of confidence.

Although this is not the accurate way to do this but its just a simple work around if it can help anyone out.

Related