Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can not import as a module #78

Open
bhargav015 opened this issue Sep 16, 2020 · 8 comments
Open

Can not import as a module #78

bhargav015 opened this issue Sep 16, 2020 · 8 comments

Comments

@bhargav015
Copy link

bhargav015 commented Sep 16, 2020

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
Screenshot from 2020-09-17 10-43-26

@mellahysf
Copy link

Hi @bhargav015
Do you found the solution?
If yes how?

@bhargav015
Copy link
Author

@mellahysf unfortunately I still not get any solution

@morfeusys
Copy link
Collaborator

@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?

@bhargav015
Copy link
Author

@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

@bhargav015
Copy link
Author

bhargav015 commented Sep 29, 2020

@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")
}
}
}
}

@bhargav015
Copy link
Author

@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

@bhargav015
Copy link
Author

@morfeusys can you tell me how to completely destroy aimybox instance ?

@bhargav015
Copy link
Author

@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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants