Issue connecting to Rasa Voice Interface - Blocked by CORS Policy

Hi everyone,

I am new to Rasa and am trying to make a voice chatbot, using Mozilla tools as per the blog post here. I understand that it was written almost a year ago that some things have changed, so I have updated it to suit my current version of DeepSpeech. Therefore the individual components all seem to be working fine. My OS is Windows 10 and I run Rasa in an Anaconda environment as shown in the installation tutorial video.

The Rasa Voice Interface should allow me to put all of these components together to create a voice assistant on my browser (Chrome). However, when I refresh my browser to run the interface the bouncing ball is still there saying ‘Waiting for Connection’.

In the console I get an error message of: Access to XMLHttpRequest at ‘http://localhost:5005/socket.io/?EIO=3&transport=polling&t=NFgEYBW’ from origin ‘http://localhost:8080’ has been blocked by CORS policy: No ‘Access-Control-Allow-Origin’ header is present on the requested resource. vue-socketio.js?5132:8 GET http://localhost:5005/socket.io/?EIO=3&transport=polling&t=NFgEYBW net::ERR_FAILED

I have not encountered this type of error before, so any guidance with regards to what it is and how to fix it would be much appreciated.

Thanks!

Hi @reece3610. Do you get all separate components working - speech-to-text and text-to-speech?

Hi @Juste thanks for your reply. I have tested the components, speech-to-text works perfectly but text-to-speech is encountering an error when trying to import torch. Is there a new version I should be using?

Hi @reece3610 I think this is where we can start looking for an issue. Can you share the version of speech-to-text component you are using? I would try to replicate that.

Great, I am using DeepSpeech 0.8.0 and have downloaded the relevant models. I don’t know if it is possible to replicate it with a version of TTS as the only one available on GitHub is v0.0.1.

After trying to run the code in Step 2 of Part 4 in the blog post (installing the package with ‘python setup.py develop’) I get a very lengthy error message. The main errors seem to be:

ERROR: Failed cleaning build dir for numpy ERROR: Failed to build one or more wheels

Thanks for the help so far, I can send through the complete error message if needed but it is very long.

Hi again @Juste. I have now got all components 100% working but still getting the same error trying to run the interface on my browser.

The only error I got while setting it up is trying to start the rasa server. When I execute:

rasa run --enable-api -p 5005

It returns an error saying:

AttributeError: module 'socketio' has no attribute 'SocketIOInput'

The server then fails to find any input connector. I seem to have avoided this error by simply replacing the socketio.SocketIOInput: line in the credentials.yml file (as originally written in the blog post) with socketio: but possibly this is causing the error?

Let me know if any other code/files would help and I would be happy to share them.

Hi @reece3610. I am here credentials.yml It was written in the document:

socketio:

user_ message_ evt: user_ uttered

bot_ message_ evt: bot_ uttered

session_ persistence: true

Because if it is socketio_ connector.SocketIOInput : an error will occur.

When I use socketio, everything works well, but the following error occurs when running rasa voice interface in browser. What should I do?

Hey i am facing the same issues, can you let me know how did you resolve them? thankyou in advance :slight_smile:

@reece3610, Please let me know if you solved this issue.I am also facing the same issue now