Suddenly I get a "java.lang.RuntimeException: couldn't find any hotword model"

#1

Hi there !
I’m working on an Android app working from a service. I use it on VM or my LG Android 6 smartphone.
I have fun, all things I do used to works.

But twice, I got a weird error java.lang.RuntimeException: could not find any hotword model

I’m destabilized because I build a lot of time, it happend after a very very light modification.

The first time, I did not solve the problem. So I had made a new branch on an old commit (wich works) on my VCS. And it works with exactly the same code that I simply copy and past.

This time, no way that I use this pathetic way to resolve this problem. I would like to know what happend and how can I resolve it.
By the way, I would like to know if some of you had this problem.

Others details:

  • My assistant.zip is unchanged and works
#2

I have just seen that it is maybe linked with the upgrade of Android studio to gradle5.1.1-all.zip in the gradle-wrapper.propertiesand & 'com.android.tools.build:gradle:3.4.0' in the build.gradle

#3

Hello @nicoolas!

Check that you have a custom_hotword folder in your assistant.zip (you won’t have one if you’re using a personal hotword, and this is not supported on the android yet)

If it is there, ensure that the extraction of the assistant is finished before you start the SnipsPlatformClient

#4

Hello !
Thank you for your fast reply.
Indeed, I have not this folder, I have a personnal hotword as you can see
there image
and there image

So you say it is not working, but previously, it used to worked with the same assistant.zip.
How could it be possible ?

#5

We have changed the way the different components are loaded by the platform on android, previously the loading wall fully asynchronous, meaning in some (most) the platform was not completely started when the onPlatformReady callback was called, which caused a lot of bugs. The new version waits loads all the components synchronously, which mean it is able to detect if a component fails to load (which is a good thing)

If you want to use your assistant as is, you can call .enabledHotword(false) on the client builder. This will disable the loading of the hotword engine, and allow you to use the assistant albeit without the hotword of course but it seems it was already the case.

#6

I would like to be sure to understand.

Do you say that, it is currently not possible to have a custom hotword on Android ?

#7

@nicoolas you are correct (support is planned however)

#8

Thank you @fredszaq !