Community Support

Error with iOS Studio - NLU model was not initialized

Hi there,
I am new to SpokeStack. I was exploring the iOS Studio sample and deploying the code to my phone. I was trying the Intent Understanding feature and I got this error. Could somebody advise me ?
Thanks

*2020-08-01 08:40:26.413751+0800 Spokestack Studio[7937:1756642] The model is not a valid Flatbuffer file*

*Failure: Failed to load the given model.*

*Failure: model("NLU model was not initialized.")*

Hi Sonyle,

Sorry you’re having issues. We’ll see if we can help. What version of iOS are you using? And iPhone?

Thanks!

Hi @Tatum,

I am using iOS 13.6 and iPhone Xr. Yesterday I did not get this error, it only happens today.

Thanks

Hi @sonyle,

The error you reported occurs when the studio app cannot find the NLU machine learning model file. Please verify that the file at https://github.com/spokestack/ios-studio/blob/master/Spokestack%20Studio%20iOS/Resources/camera.tflite is present in your project, and included in the project setting’s resource files.

Thanks for checking out Spokestack!

—Noel

hi @noelweichbrdot

The file is present in my project at Resources folder. I did inspect that file and it seems already included in the project resource settings.

Hi @sonyle, sorry for the delay!

The app will attempt to load the file indicated at this path:

Ensure that the file indicated above is present in the project setting’s resource files:

Since you say it was working before an unknown change occurred, you could also use git to revert to the remote branch state and wipe away any inadvertent changes that may have been made.

Alternatively, you can verify the model path being using by breakpointing the following line:

Hope this helps!
—Noel

Hi Noel,

I managed to get the issue resolved by downloading the original camera.tflite file from git remote branch.

Thank you for your help.

Glad it’s working for you. Have fun!