#import gradio as gr #import speech_recognition as sr #def transcribe_audio(file_info): # recognizer = sr.Recognizer() # audio_file = file_info # with sr.AudioFile(audio_file) as source: # audio_data = recognizer.record(source) # try: # text = recognizer.recognize_google(audio_data) # return text # except Exception as e: # return f"Error: {str(e)}" #iface = gr.Interface( # fn=transcribe_audio, # inputs="audio", # outputs="text" #) #iface.launch(share=True)