Update app.py
Browse files
app.py
CHANGED
|
@@ -293,6 +293,9 @@
|
|
| 293 |
|
| 294 |
# demo.launch(server_name="0.0.0.0", server_port=7860)
|
| 295 |
# app.pyimport os
|
|
|
|
|
|
|
|
|
|
| 296 |
import time
|
| 297 |
import numpy as np
|
| 298 |
import torch
|
|
@@ -408,11 +411,12 @@ with gr.Blocks() as demo:
|
|
| 408 |
|
| 409 |
with gr.Row():
|
| 410 |
with gr.Column(scale=2):
|
| 411 |
-
mic = gr.Audio(
|
| 412 |
-
|
| 413 |
-
|
| 414 |
-
|
| 415 |
-
)
|
|
|
|
| 416 |
lang = gr.Dropdown(choices=["Sindhi", "English"], value="Sindhi", label="Language")
|
| 417 |
btn = gr.Button("Start Transcription")
|
| 418 |
with gr.Column(scale=3):
|
|
|
|
| 293 |
|
| 294 |
# demo.launch(server_name="0.0.0.0", server_port=7860)
|
| 295 |
# app.pyimport os
|
| 296 |
+
import os
|
| 297 |
+
import io
|
| 298 |
+
import gradio as gr
|
| 299 |
import time
|
| 300 |
import numpy as np
|
| 301 |
import torch
|
|
|
|
| 411 |
|
| 412 |
with gr.Row():
|
| 413 |
with gr.Column(scale=2):
|
| 414 |
+
# mic = gr.Audio(
|
| 415 |
+
# sources=["microphone", "upload"],
|
| 416 |
+
# type="filepath",
|
| 417 |
+
# label="🎤 Record or Upload Audio"
|
| 418 |
+
# )
|
| 419 |
+
mic = gr.Audio(sources="microphone", streaming=True)
|
| 420 |
lang = gr.Dropdown(choices=["Sindhi", "English"], value="Sindhi", label="Language")
|
| 421 |
btn = gr.Button("Start Transcription")
|
| 422 |
with gr.Column(scale=3):
|