jonnatakusuma commited on
Commit
99007d7
1 Parent(s): 11d063e

Delete Basic.py

Browse files
Files changed (1) hide show
  1. Basic.py +0 -36
Basic.py DELETED
@@ -1,36 +0,0 @@
1
- import streamlit as st
2
- import whisper
3
- from tempfile import NamedTemporaryFile
4
- import ffmpeg
5
-
6
-
7
- st.title("Whisper App")
8
-
9
- # upload audio file with streamlit
10
- audio_file = st.file_uploader("Upload Meeting Audio", type=["mp3"])
11
-
12
- # model = whisper.load_model("base") # loading the base model
13
- st.text("Whisper Model Loaded")
14
-
15
- def load_whisper_model():
16
-
17
- return model
18
-
19
-
20
- if st.sidebar.button("Transcribe Audio"):
21
- if audio_file is not None:
22
- with NamedTemporaryFile(suffix="mp3") as temp:
23
- temp.write(audio_file.getvalue())
24
- temp.seek(0)
25
- model = whisper.load_model("base")
26
- result = model.transcribe(temp.name)
27
- st.write(result["text"])
28
- # st.sidebar.success("Transcribing Audio")
29
- # transcription = model.transcribe(audio_file.name)
30
- # st.sidebar.success("Transcription Complete")
31
- # st.markdown(transcription["text"])
32
- # else:
33
- # st.sidebar.error("Please upload an audio file")
34
-
35
- st.sidebar.header("Play Original Audio File")
36
- st.sidebar.audio(audio_file)