Using google speech cloud api from android give error in GOOGLE_APPLICATION_CREDENTIALS

前端 未结 1 1250
滥情空心
滥情空心 2021-01-28 19:23

I am trying to build an app that use google speech cloud api in android kotlin

here is my code

launch {
             googleTextToSpeech = TextToSpeechC         


        
相关标签:
1条回答
  • 2021-01-28 20:04

    I'm not an Android developer, but my feeling is that you shouldn't call the TextToSpeech directly from your Android app. You should call it through a backend (On AppEngine for example, or on Firebase Functions).

    This backend is authenticated by the TextToSpeech API, and your Android client is authenticated on your backend.

    Thereby, you can control who use your app, and your TextToSpeech feature. In any case, never put the service account secret key file in your app, either anybody that download you app can steal the key and perform call on the service account behalf and you will pay the bill!

    0 讨论(0)
提交回复
热议问题