File size: 543 Bytes
d0a1326
 
 
 
 
 
6c4dcd8
 
 
d0a1326
97163f6
 
2c98115
0d3902f
6c4dcd8
2c98115
 
 
0d3902f
 
 
 
deaa5e4
 
 
d0a1326
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import streamlit as st
from transformers import pipeline


st.title("Speech to Text")

transcriber = pipeline(model="openai/whisper-medium")
# audio_file = st.file_uploader("Upload an audio file")
audio_file = "https://huggingface.co/datasets/Narsil/asr_dummy/resolve/main/mlk.flac"



if audio_file:
    # to flac
    text = transcriber(audio_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")