import torch from torch import * from transformers import pipeline import streamlit as st from st_audiorec import st_audiorec pipe=pipeline("automatic-speech-recognition","distil-whisper/distil-large-v2") st.title('speech recognition') wave_audio_data=st_audiorec() if wave_audio_data is None: audio_input=st.audio(wave_audio_data,format="audio/wave") text=pipe(audio_input) st.write(text) else: st.error('No Audio data')