Spaces:
Sleeping
Sleeping
File size: 516 Bytes
e83c83d a26860c e83c83d 428f475 e83c83d a26860c e83c83d a26860c e83c83d |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
#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) |