Can we use the Twilio connector to deploy an assistant that is available over voice message instead of text message?

Hello everyone ! I recently deployed a chatbot accessible via Whatsapp using the Twilio sandbox. The chatbot works fine with text messages but I have the following error when sending a voicemail message:

rasa.core.channels.twilio - Exception when trying to handle message.'NoneType 'object has no attribute' replace '

So I was wondering how I can manage the voice messages sent from Whatsapp !?

Thanks for your help

What is your goal with the voice message? You want to store it or something else? Rasa currently does not offer voice to text.

Hi @koaning ! Basically, a user can communicate with my chatbot via the Whatsapp interface by sending text messages. Now I would like him to be able to also transmit vocals that I will process. Indeed, I am aware that RASA does not offer a voice to text service. I plan to use Amazon Transcribe for that. I would like that, in the same way, that the text messages coming from WhatsApp are forwarded to the bot, that the voices are also transmitted. Because of this, I could convert it to text with Amazon Transcribe, process it with RASA, and then convert the text response to voice with Amazon Polly before sending it back to the user.

That’s basically what I want to do.

Now when I send voicemail from WhatsApp this is where I get the error I mentioned earlier instead of the audio stream going.

My collegue suggests to extend the twilio channel to, when it sees a voice message, use amazon to turn it into text and send that to rasa’s on_new_message. The error you’re seeing is probably because we don’t handle it. It’s not expecting that input data format but you might be able to do this with custom code.

This is probably the line of code that is complaining. rasa/twilio.py at master · RasaHQ/rasa · GitHub There’s no text.

Alright, I suspected it! Thank you very much for your feedback. I will explore this path!

1 Like