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 and user needs to be manually set this parameter to perform speech-to-text.
Thanks Mahesh
Requests to Google Cloud Speech API require the following configuration parameters:
encoding
,sampleRateHertz
andlanguageCode
. https://cloud.google.com/speech/reference/rest/v1/RecognitionConfigThus, it is not possible for the Google Cloud Speech API service to automatically detect the language used. The service will be configured by this parameter (
languageCode
) to start recognizing speech in that specific language.If you had in mind a parallel with Google Cloud Translation API, where the input language is automatically detected, please consider that automatically detecting the language used in an audio file requires much more bandwidth, storage space and processing power than in a text file. Also, Google Cloud Speech API offers Streaming Speech Recognition, a real-time speech-to-text service, where the
languageCode
parameter is especially required.As of last month, Google added support for detection of spoken languages into its speech-to-text API. Google Cloud Speech v1p1beta1
It’s a bit limited though - you have to provide a list of probable language codes, up to 3 of them only, and it’s said to be supported only for voice command and voice search modes. It’s useful if you have a clue what other languages may be in your audio.
From their docs:
alternative_language_codes[]: string