zanemotiwala commited on
Commit
cea3a6b
·
verified ·
1 Parent(s): 4f455f6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -8
app.py CHANGED
@@ -26,23 +26,17 @@ def transcribe_speech(audio_file_path):
26
 
27
  logging.basicConfig(level=logging.INFO)
28
 
29
- #with gr.Blocks() as demo:
30
- # with gr.Row():
31
- # mic = gr.Audio(label="Record from Microphone or Upload File", type="filepath")
32
- # transcribe_button = gr.Button("Transcribe Audio")
33
-
34
  with gr.Blocks() as demo:
35
  with gr.Row():
36
  gr.Markdown("# Simple Speech Recognition App")
 
37
  gr.Markdown("### This app allows you to record or upload audio and see its transcription. Powered by the speech_recognition library.")
38
  with gr.Row():
39
  mic = gr.Audio(label="Record from Microphone or Upload File", type="filepath")
40
- transcribe_button = gr.Button("Transcribe Audio")
41
  with gr.Row():
42
  transcription = gr.Textbox(label="Transcription", lines=3, placeholder="Transcription will appear here...")
43
 
44
- #transcription = gr.Textbox(label="Transcription", lines=3, placeholder="Transcription will appear here...")
45
-
46
  transcribe_button.click(transcribe_speech, inputs=mic, outputs=transcription)
47
 
48
  demo.launch(share=True)
 
26
 
27
  logging.basicConfig(level=logging.INFO)
28
 
 
 
 
 
 
29
  with gr.Blocks() as demo:
30
  with gr.Row():
31
  gr.Markdown("# Simple Speech Recognition App")
32
+ with gr.Row():
33
  gr.Markdown("### This app allows you to record or upload audio and see its transcription. Powered by the speech_recognition library.")
34
  with gr.Row():
35
  mic = gr.Audio(label="Record from Microphone or Upload File", type="filepath")
36
+ transcribe_button = gr.Button("Transcribe Audio", style={"background-color": "blue", "color": "white"})
37
  with gr.Row():
38
  transcription = gr.Textbox(label="Transcription", lines=3, placeholder="Transcription will appear here...")
39
 
 
 
40
  transcribe_button.click(transcribe_speech, inputs=mic, outputs=transcription)
41
 
42
  demo.launch(share=True)