aimybox-android-assistant icon indicating copy to clipboard operation
aimybox-android-assistant copied to clipboard

Google Cloud Speech to Text not working properly

Open bhargav015 opened this issue 4 years ago • 1 comments

I am using core library for core functionality in my app. that is 'com.justai.aimybox:core:0.11.0'. and I am using Google cloud speechkit for TTS and STT APIs.

The problem is that speech recognization is not working many times. Sometimes it works and somtimes its not. And even if it starts recognizing the speech. It stopps after recognizing few words. Please let me know what is the issue and how to resolve it very quickly. I am posting the code here that I am using

Below is the code for Initializing Aimybox

`//[START] Initializing Aimybox assistance at the application level, * to get the singleton object throughout the app*/ val credentials = GoogleCloudCredentials.fromAsset(applicationContext, "credentials.json")

    GoogleCloudTextToSpeech.Config(Gender.FEMALE)
    val textToSpeech = GoogleCloudTextToSpeech(applicationContext, credentials, Locale.ENGLISH)
    val speechToText = GoogleCloudSpeechToText(credentials, Locale.ENGLISH)

    //val dialogApi = AimyboxDialogApi("your Aimybox project API key", unitId)
    val unitId = UUID.randomUUID().toString()
    val dialogApi = DummyDialogApi()
    aimybox = Aimybox(Config.create(speechToText, textToSpeech, dialogApi))`

And here is the code to start recognizing the speech

aimybox.startRecognition()

Please provide the solution quickly.

bhargav015 avatar Sep 12 '20 12:09 bhargav015

What error do you see in the logs?

morfeusys avatar Sep 15 '20 17:09 morfeusys