How can my assistant play music for X seconds?


I want to implement a custom action to allow my Rasa assistant to play music for a bit. How can I code this? Can I define a number of seconds the music will play (e.g., 10 seconds). And how can I change/randomise the music played every time my user uses bot again?


@ml2021 Hello, Your queries are always unique and innovative :slight_smile:

What kind of music and how you will fetch the music file, any concept for your use case?

@nik202 thanks for your reply. Say a list of music clips saved in a database. Can this be implemented in Rasa? How?

@ml2021 well anything can happen :slight_smile:

well, personally I have not implemented the music or song one, but I can share one repo for you, hope this will help you?

Note: This is just my suggestion, you can optimise as per your use case please.