bori0824 commited on
Commit
fbaa78b
·
verified ·
1 Parent(s): 8d8e733

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +22 -0
app.py ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ import gradio as gr
3
+
4
+ def process_audio(audio):
5
+ """
6
+ Dummy processing function.
7
+ In a real app, you could process the audio (e.g., transcribe it) before returning it.
8
+ Returning the input audio here allows it to be downloaded by the user.
9
+ """
10
+ return audio
11
+
12
+ # Create the Gradio interface
13
+ iface = gr.Interface(
14
+ fn=process_audio,
15
+ inputs=gr.Audio(sources="microphone", type="numpy", label="Record your speech"),
16
+ outputs=gr.Audio(label="Your recorded speech"),
17
+ title="Audio Recorder",
18
+ description="Click the button below to record your speech. You can download the recording after it's processed."
19
+ )
20
+
21
+ # Launch the app
22
+ iface.launch()