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 !?
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.