How can I insert audio files in rasa chatbot?

It’s our first time training a rasa chatbot, and we know how to put buttons and images. But we are trying to figure out it is possible to insert audio files.

@Julian audio with video?

Hello, only audio

@Julian Ok, your audio source, where it reside or you just want to upload from your local machine or want to redirect to some audio link?

We are trying to use the second option, via url

@Julian well I not personally implemented the audio. But I can give you an idea.

You can mention the link like this :

responses:
- text: Please see this [audio](https://youtu.be/lWP1K-IcAN4)

try replace the URL link with Audio link?

OR

utter_audio:
  - custom:
    attachment:
      type: video
      payload:
        src: fullpath/filename.mp4
      autoplay: true

OR

Please see this repo: GitHub - hetpandya/rasa-song-chatbot

Note:

Much of the things are also depends on the front-end you are using, so keep that in mind whilst implementing your use case example.

Please do let me know.

1 Like

Thanks for the information, I am going to try the second option and the third, we would like the audio to appear as a WhatsApp voice note, and we should try the second option.