How to make Rasa work offline on Android

Hi,

I integrated Rasa with Aimybox, and now I have a very nice vocal chatbot working as an Android app.

What I would like to do next is to allow the chatbot to work offline, so integrating my model in the app so that it doesn’t need to connect to the remote server.

Is this possible?

Thank you, Tiziano

1 Like

Anybody please?

Hey @tiziano, at the moment it is not possible to do this with Rasa Open Source.

The main problem here is that Rasa Open Source has dependencies such as TensorFlow 2.0, which you would need get working on your Android phone somehow. As far as we know, this is currently not possible, or would take a very large amount of work to do. There may be other dependencies as well which are distributed as binary packages (wheels), which you might not get working on Android as well. They also tend to depend on the CPU architecture (x86-64, ARM, etc.), which makes it even trickier.

1 Like

Ok, thanks!

Hi, i am facing the same problem, needing to implement the bot to work offline from Android devices (and iOS maybe). Implementing the whole pipeline seems difficult, i was thinking about porting the model to TensorflowLite. Is this even possible? The training will be done in PC, I only need the inference, so probably no need for python. Also no need for CORE features, NLU will be enough. Any updates on this?

I am not sure if this may help you in any way but I have been considering an offline Rasa tool for some while now. I new off the bat that porting to android would have more constraints at this time and I myself am no programmer capable of working these. But, I came around to a possible solution, Raspberry pi. There is somewhere here a post of someone implementing a functional Rasa bot on a raspberry pi and, I though that if one where to make the raspberry a portable battery powered component of sorts, and connecting it to the phone via Bluetooth it might work. Now, I do understand that this would mean carrying around another piece of tech might be cumbersome for some people. This is not a perfect solution or maybe of no use at all for your ends, but it might work for some people…

1 Like

That is a possible solution I have considered, but my company needs to exclusively use a phone with no external device to accomplish this. I ended up training a TensorflowLite model and creating a mini framework. However, this is no match for Rasa ofc, I hope one day it can be ported to android somehow.