import streamlit as st import pydub as pd from transformers import pipeline st.title("Speech to Text") audio_file = st.file_uploader("Upload an audio file") if audio_file: # to flac flac_file = pd.AudioSegment.from_file(audio_file) transcriber = pipeline(model="openai/whisper-medium") text = transcriber(flac_file) if text: st.write("Here is the text:") st.write(text) else: st.write("Processing or No text found in the audio file") else: st.write("waiting for file")