Exception: Failed to find input channel class for 'socketio_connector.SocketIOInput'

I am following the link “How to build a voice assistant with open source Rasa and Mozilla tools ” to integrate speech with Rasa. I did all the changes mentioned in the blog but on running command “rasa run --enable-api -p 5005” getting error failed to find input channel class for ‘socketio_connector.SocketIOInput’.

The times I have had this error it has been due to either errors in the connector file or something missing. If you look about halfway up your error message it shows that you have no module named torch installed.

Hi John I have this module installed then also I am getting this error.

Could u please share with the connector file with me?

So you are getting the same import error stating no module named ‘torch’, or is it a different error now? If you are getting the same error and pip is showing it as being installed I would just type python on the command line to enter the interpreter and then type import torch and just to make sure it can import. Make sure you are in the venv that you are using for rasa. I will see if I can find an old connector file set up for deepspeech. I probably have it in a backup somewhere.

Hi John I tried importing torch module too.

As in snapshot I am able to import torch module then also don’t know where I am getting wrong. Also getting exception of failed to find input channel class for “socketio_connector.SocketIOInput” If u could share with me ur project files that would help.

Thanks in advance

I looked on my computer I don’t even have the old deepspeech socketio file on there anymore I will have to look in the backups on my server. What I would do is start with the newer version of the socketio file:

Make sure that it is loading, then add the deepspeech into the file a step at a time. Add the imports and test it. Load the model next and test it etc. You will have to edit the handle_message function and have it actually call deepspeech to do the stt. Once you have the deepspeech working then start integrating tacotron and waveglow. You will need to edit the send_text_message to send the json with both the text and the audio link to return the audio generated.

Hi John , above mentioned script is getting loaded without throwing any error message. I have to perform further steps mentioned by you. Also please let me know if u r able to interact with bot via voice as input using new modified socketio script. Thanks John for your help.

Yes it will work. The simplest way that you can get it going is integrate google tts and stt using the available python libraries. This will allow you to get it working and then if you want to go ahead with deepspeech and tacotron/waveglow you can. That is a pretty simple integration without worrying about loading models etc.