Spaces:
Sleeping
Sleeping
| import gradio as gr | |
| from test1 import asr_transcribe | |
| from _utils import audio_to_bytes | |
| def transcribe(audio): | |
| # convert the audio to bytes | |
| audio_bytes = audio_to_bytes(audio) | |
| transcription = asr_transcribe(audio_bytes) | |
| # transcribe | |
| return transcription | |
| demo = gr.Interface( | |
| transcribe, | |
| gr.Audio(sources="microphone"), | |
| "text", | |
| ) | |
| demo.launch() |