For a Shiny app, I want to be able to play audio files that are generated during the session itself. If it were an audio-file that I want to upload, I would use
tags$audio(src = "www/name.wav", type = "audio/wav")
However, I could not find a way to use tags$audio if the audio file is generated during the session, and thus I do not have a filename or path. Any suggestions on how I can play such audio files? Thanks!
EDIT: I added a short reproducible example. Hopefully it becomes more clear what I am trying to do.
url <- "http://www.wavlist.com/humor/001/911d.wav"
# Define the temporary directory and download the data
dest_path <- "sound.wav"
download.file(url,destfile = dest_path)
# Load the audio file
test <- audio::load.wave(dest_path)
# Change something small to this audio file
test <- test + 0.3
My question now is how can I play "test" using tags$audio(src = "", type = "audio/wav")
, without having a path for the src = ""
?