I have a data frame about voices and emotions. Using shiny I want to create a scatter plot graph with a tooltip which shows the name and type of emotions and runs the audio file. When people click on a point, I want to hear the audio of this emotion. However, I cannot find any solution to run an audio file. Audio files in wav format. Basically, I want to know how I add audio files into hoover or tooltip. I used hchart package for create graph.
This is server part of my shiny app
require(shinydashboard)
require(ggplot2)
require(dplyr)
require(highcharter) 
library(readxl)
require(tidyr)
server <- function(input, output) {  
  output$hcontainer <- renderHighchart ({
    data_frame <- data %>% filter(Language == input$language & acoustics == input$acoustic_parameter) 
    ##plot, ADD audio file for points
    hchart(data, "scatter", hcaes(x = Emotion , y = values, group = Vocalization)) %>%
      hc_exporting(enabled = TRUE) %>% 
      hc_tooltip(crosshairs = TRUE, backgroundColor = "#FCFFC5",
                 shared = TRUE, borderWidth = 2) %>%
      hc_title(text="Acoustic Parameter",align="center") %>%
      hc_subtitle(text="Emotion - Vocalization Graph",align="center") %>%
      hc_add_theme(hc_theme_elementary())
  })
}
This is the codes for ui
##required packages.
library(shinydashboard)
require(shiny)
require(highcharter)
##there is two input, language: Dutch, Chinese, acoustic parameter: 10 different, 
language <- c("Dutch", "Chinese") 
acoustic_parameter <- c("loudness_sma3_amean",
                        "loudness_sma3_pctlrange0-2",
                        "mfcc3_sma3_amean",
                        "F1amplitudeLogRelF0_sma3nz_amean",
                        "hammarbergIndexV_sma3nz_amean",
                        "F0semitoneFrom27.5Hz_sma3nz_percentile20.0",
                        "loudness_sma3_percentile50.0",
                        "mfcc1_sma3_amean",
                        "HNRdBACF_sma3nz_amean",
                        "F2amplitudeLogRelF0_sma3nz_amean")
dashboardPage(
  #defines header of dashboard
  skin = "red",
  dashboardHeader(
    title="Shiny Project Deneme" ,
    dropdownMenu()
  ),
  ##define sidebar 
  dashboardSidebar(
    sidebarMenu(
      menuItem("Dashboard", tabName = "dashboard", icon = icon("dashboard")),
      menuItem("About", tabName = "about", icon = icon("th")),
      menuItem("Project",tabName="unions",icon=icon("signal"))
    )
  ),
  ##defines body
  dashboardBody(
    tags$head(
      tags$link(rel = "stylesheet", type = "text/css", href = "custom.css")
    ),
    #First TAB Menu-Dashboard  
    tabItem(tabName = "dashboard",
            fluidRow(
              column(12,
                     box(selectInput("language", label = "Language", choices = language))),
              column(12,
                     box(selectInput("acoustic_parameter", label = "acoustic parameter", choices = acoustic_parameter))),
              column(12,
                     box(
                       highchartOutput("hcontainer"),
                        width="12") #end of the box
              ), #close the column
          hr(),
          h4("Plot of the these Project", align = "center"),
          br(),
          column(12, 
                 box(
                   highchartOutput("hc2"), width=12
                 ))
            ), ## close the row 
          h4("First trial", strong("Alkim Karakurt")), 
    ), # close the first tab item 
    #second tab menu 
      tabItem(tabName = "about", 
              fluidPage(
      br(),
      br(),
      box(width = 12, height = "300px",
          p(style ="font-size:18px", strong("Center for Data Science"), "Project Type"),
          ) #close box
              ) #close fluid
      ), #close tab item
  )
)
