corfodemo / app.py
sergiolucero's picture
Update app.py
d8215b2 verified
raw
history blame
No virus
390 Bytes
import gradio as gr
from pydub import AudioSegment
from ailib import whisper_transcribe
def transcribe(audiofile):
#audio = AudioSegment.from_file(audiofile)
#open(filename, 'wb').write(audio)
return whisper_transcribe(audiofile)
gr.Label("Demo CORFO")
demo = gr.Interface(
transcribe,
gr.Audio(sources=["microphone"], type="filepath"),
"text",
)
demo.launch()