Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Language code detection of spoken language in Google Speech API [duplicate]

Tags:

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.

like image 802
Jon Stark Avatar asked Jul 04 '17 08:07

Jon Stark


People also ask

How many languages can Google speech API recognize?

You can list up to three alternative languages from among those that Speech-to-Text supports in addition to your primary language (for four languages total).

How is language automatically detected?

On the Review tab, in the Language group, click Language. Click Set Proofing Language. In the Language dialog box, select the Detect language automatically check box.


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

like image 128
Jon Stark Avatar answered Oct 11 '22 14:10

Jon Stark