I tried to record the user voice of my app with soundevice:
audio_input = sd.rec(frames=int(sampling_rate * duration), samplerate=sampling_rate, channels=1)
It works on my computer, but not on the cloud. Here is the message I received:
File "/home/user/.local/lib/python3.10/site-packages/sounddevice.py", line 71, in <module>
raise OSError('PortAudio library not found')
I tried also to use PyAudio, without success…
What should I do ? (Is there a way to import PortAudio…)
Thanks
Franky1
September 7, 2023, 3:53pm
2
This approach will fundamentally not work on streamlit cloud, because you don’t have access to the clients audio hardware from the hosted streamlit application.
Thank you Franky1, but can you help to sort it out, i.e. “record user voice” ?
Franky1
September 7, 2023, 4:23pm
4
You will need a custom streamlit component, that can record audio via the webbrowser api.
Possible options:
streamlit-audiorecorder
audio-recorder-streamlit
streamlit-webrtc
maybe more…
system
Closed
September 9, 2023, 6:46pm
6
This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.