Error in audio transcription app using whisper hosted on streamlit cloud

hi, i am currently writing a ai tool which is a audio transcription application and i found this error.

it will be very helpful if someone tells how to solve ffmpeg file not found error. recently i have came across this that u have to give filepath for a file for transcribe() function. if this was on local machine i could have given the path where the audio was stored but on streamlit cloud how can we give the file path of a uploaded audio file?

here is the code…

import streamlit as st
import whisper
st.set_page_config(page_title="chatPdf", page_icon="🧊")
st.title("Audio transciption app")

#upload audio file with streamlit
audio_file = st.file_uploader("Upload Audio", type=["wav","mp3","mp4"])
#importing model -- base(74M pararameter)
model = whisper.load_model("base")"Whisper model loaded")

st.header("Play audio file:")

if st.button("Transcribe Audio"):
    if audio_file is not None:
        st.success("Transcribing Audio")
        transcription = model.transcribe(
        st.success("Transcription Complete")
        st.error("Please upload a audio file")


1 Like

hi franky1 thanks for the help but now there is a new error showing up after i added ffmpeg packages.txt

This seems to be a duplicate of these posts:

Going to close this thread for clarity