File size: 347 Bytes
c9b78ae
 
 
 
 
 
3027bc9
f4f6097
 
c9b78ae
a6f725c
c9b78ae
1
2
3
4
5
6
7
8
9
10
11
12
import gradio as gr
from huggingface_hub import InferenceClient
import os

listen_client = InferenceClient("openai/whisper-medium")

def func(audio_):
    val=listen_client.automatic_speech_recognition(audio_).text
    return val
    
gr.Interface(fn=func, inputs=gr.Audio(sources=["microphone"], type="filepath"), outputs=gr.Text()).launch()