corfodemo / app.py
sergiolucero's picture
Update app.py
246edcb verified
raw
history blame
369 Bytes
import gradio as gr
from transformers import pipeline
import numpy as np
from ailib import whisper_transcribe
def transcribe(audio):
filename = 'audio.wav'
open(filename, 'wb').write(audio)
return whisper_transcribe(filename)
gr.Label("Demo CORFO")
demo = gr.Interface(
transcribe,
gr.Audio(sources=["microphone"]),
"text",
)
demo.launch()