I’m trying to run a simple code to playback sound on streamlit. This works in my local machine, but I can’t get it to work after deploying it to the streamlit app. I’m using a python package called SCAMP to playback the sound.
Below is the python code. I’ve included ‘scamp’ and ‘scamp-extensions’ to my ‘requirements.txt’ file. I also included ‘scamp’ and ‘fluidsynth’ to ‘packages.txt’ file.
from scamp import *
import streamlit as st
st.set_page_config(page_title = "streamlit and scamp", page_icon = ":tdata:")
st.subheader("chekc check :wave:")
st.title("streamlit and scamp")
s = Session()
s.tempo = 120
piano = s.new_part("piano")
c2 = [36,38,40,41,43,41,40,38,36]
for note in c2:`
piano.play_note(note, 0.8, 1)
some of the errors I see on the log are: fluidsynth: error: Error opening ALSA sequencer Cannot connect to server socket err = No such fil fluidsynth: error: Couldn’t find the requested audio driver ‘portaudio’. fluidsynth: This build of fluidsynth supports the following audio drivers: alsa, file, jack, oss, pulseaudio, sdl2