A wave/mp3 file in shiny?

Hello everyone!

Does anyone here ever tried to use audio files in a shiny app?
I'm not talking about chip music.

Thanks!

The answer at the following link shows how to add audio files:

https://groups.google.com/forum/#!searchin/shiny-discuss/audio/shiny-discuss/zO8hEFCxa0c/9B5DlfuVVb8J

Basically, you need to add an audio tag and specify the audio file you'll be using. This audio file must be in a www folder within your shiny project.

I have a Shiny module in googleLanguageR that will play audio - I needed it for text-to-speech, but it should work with any audio file:

Thanks everyone! It was helpful!

Do you know how to make the audio autoplay?

In the linked file, you can see an example - set autoplay attribute to NA

    shiny::tags$audio(autoplay = NA,
                      shiny::tags$source(src = wav_file()))
1 Like

This topic was automatically closed 54 days after the last reply. New replies are no longer allowed.