aimybox-android-sdk
aimybox-android-sdk copied to clipboard
Can not import as a module
I am trying to import a project as a module in my project, but when I try to do this I am getting below error:
failed core/build.gradle.kts Unresolved reference: justai Unresolved reference: justai Unresolved reference: configureProject Unresolved reference: createMavenPublication Unresolved reference: isLibrary Unresolved reference: publishToBintray Unresolved reference: configureAndroid Unresolved reference: Android Unresolved reference: Kotlin Unresolved reference: Kotlin Unresolved reference: Version Unresolved reference: Version Unresolved reference: Version Unresolved reference: Version Script compilation errors:
And here is the screenshot
Hi @bhargav015 Do you found the solution? If yes how?
@mellahysf unfortunately I still not get any solution
@bhargav015 sorry for delay. Why do you try to import it as a module instead of a direct way - using dependencies in your gradle file?
@morfeusys first I used it as a gradle dependency only. But at that time, I am not able to get the callback for SpeechToText.Event.EmptyRecognitionResult
As per the comments written in library classes, when it not detect any speech in specified interval of time that is 10 seconds then EmptyRecognitionResult will get called. So in this callback I want to start the recognition again.
But I am not getting that callback and hence I need to be imported as a module.
Otherwise please guide me why I am not getting that callback when speech not recognized in specified time. I need to recognize the speech continously.
Please suggest some way its an urgent task and thanks for giving reply
@morfeusys also SpeechStartDetected and SpeechEndDetected also not getting fired. Just to let you know I am using GCP for TTS and STT.
Here is my code
aimyboxSttEvents = launch { getAimyBox().speechToTextEvents.consumeEach { event: SpeechToText.Event -> when (event) { is SpeechToText.Event.RecognitionResult -> { Log.e(AIMYBOX_LOG, "Speech Recognized") } is SpeechToText.Event.RecognitionStarted -> { Log.e(AIMYBOX_LOG, "Recognition started") } is SpeechToText.Event.RecognitionPartialResult -> { } is SpeechToText.Event.EmptyRecognitionResult -> { Log.e(AIMYBOX_LOG, "Empty Recognition Result") } is SpeechToText.Event.RecognitionCancelled -> { Log.e(AIMYBOX_LOG, "Recognition Cancelled") delay(500); getAimyBox().startRecognition() } is SpeechToText.Event.SpeechStartDetected -> { Log.e(AIMYBOX_LOG, "Speech start detected") } is SpeechToText.Event.SpeechEndDetected -> { Log.e(AIMYBOX_LOG, "Speech end detected") } } } }
@morfeusys And one more important thing I need to understand is
I have one single instance of Aimybox at application level and I want to call that from 2 different activities. then how to pause and resume while switching from one activity to another
While trying getAimyBox().mute()
or getAimyBox().cancelCurrentTask()
or getAimyBox().cancelPendingRequest()
I frequently get an exception like 'the call was already half-closed'.
Please suggest me a proper way how to switch the activities that both using the same instance of Aimybox
@morfeusys can you tell me how to completely destroy aimybox instance ?
@bhargav015 sorry for delay. Why do you try to import it as a module instead of a direct way - using dependencies in your gradle file?
@morfeusys can I get some soultion for this issue? as it is very urgent for me