JBHF commited on
Commit
48cb3ec
1 Parent(s): 08aba31

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +28 -0
app.py CHANGED
@@ -1,4 +1,32 @@
1
  # https://github.com/theevann/streamlit-audiorecorder
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
 
3
  import streamlit as st
4
  from audiorecorder import audiorecorder
 
1
  # https://github.com/theevann/streamlit-audiorecorder
2
+ # An audio Recorder for streamlit
3
+ #
4
+ # Description
5
+ # Audio recorder component for streamlit.
6
+ # It creates a button to start the recording and takes three arguments:
7
+ # the start button text, the stop button text, and the pause button text.
8
+ # If the pause button text is not specified, the pause button is not displayed.
9
+ #
10
+ # Parameters
11
+ # The signature of the component is:
12
+ # audiorecorder(start_prompt="Start recording", stop_prompt="Stop recording", pause_prompt="", key=None):
13
+ # The prompt parameters are self-explanatory, and the optionnal key parameter is used internally by streamlit
14
+ # to properly distinguish multiple audiorecorders on the page.
15
+ #
16
+ # Return value
17
+ # The component's return value is a pydub AudioSegment.
18
+ #
19
+ # All AudioSegment methods are available, in particular you can:
20
+ # - Play the audio in the frontend with st.audio(audio.export().read())
21
+ # - Save the audio to a file with audio.export("audio.wav", format="wav")
22
+ # JB: Waarom zie ik in mijn HF Spaces omgeving de file "audio.wav" niet terug ?
23
+ #
24
+ # Installation:
25
+ # pip install streamlit-audiorecorder
26
+ # Note: This package uses ffmpeg, so it should be installed for this audiorecorder to work properly.
27
+ #
28
+ # On ubuntu/debian: sudo apt update && sudo apt install ffmpeg
29
+ # On mac: brew install ffmpeg
30
 
31
  import streamlit as st
32
  from audiorecorder import audiorecorder