Spaces:
Runtime error
Runtime error
Neal Caren
commited on
Commit
•
80f0f94
1
Parent(s):
6178c80
full?
Browse files
app.py
CHANGED
@@ -6,7 +6,7 @@ from simple_diarizer.diarizer import Diarizer
|
|
6 |
import streamlit as st
|
7 |
|
8 |
def speech_to_text(uploaded):
|
9 |
-
model = whisper.load_model('
|
10 |
result = model.transcribe(uploaded,verbose=True)
|
11 |
return f'You said: {result["text"]}'
|
12 |
|
@@ -26,7 +26,7 @@ def segment(nu_speakers):
|
|
26 |
|
27 |
def audio_to_df(uploaded):
|
28 |
monotize(uploaded)
|
29 |
-
model = whisper.load_model('
|
30 |
result = model.transcribe('mono.wav',verbose=True,
|
31 |
without_timestamps=False)
|
32 |
tdf = pd.DataFrame(result['segments'])
|
@@ -75,6 +75,17 @@ def transcribe(uploaded, nu_speakers):
|
|
75 |
return '\n'.join(lines)
|
76 |
|
77 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
78 |
form = st.form(key='my_form')
|
79 |
uploaded = form.file_uploader("Choose a file")
|
80 |
nu_speakers = form.slider('Number of speakers in audio file:', min_value=1, max_value=6, value=2, step=1)
|
|
|
6 |
import streamlit as st
|
7 |
|
8 |
def speech_to_text(uploaded):
|
9 |
+
model = whisper.load_model('base')
|
10 |
result = model.transcribe(uploaded,verbose=True)
|
11 |
return f'You said: {result["text"]}'
|
12 |
|
|
|
26 |
|
27 |
def audio_to_df(uploaded):
|
28 |
monotize(uploaded)
|
29 |
+
model = whisper.load_model('base')
|
30 |
result = model.transcribe('mono.wav',verbose=True,
|
31 |
without_timestamps=False)
|
32 |
tdf = pd.DataFrame(result['segments'])
|
|
|
75 |
return '\n'.join(lines)
|
76 |
|
77 |
|
78 |
+
descript = ("This web app creates transcripts using OpenAI's [Whisper](https://github.com/openai/whisper) to transcribe "
|
79 |
+
"audio files combined with [Chau](https://github.com/cvqluu)'s [Simple Diarizer](https://github.com/cvqluu/simple_diarizer) "
|
80 |
+
"to partition the text by speaker.\n"
|
81 |
+
"* You can upload a audio or video file of up to 200MBs.\n"
|
82 |
+
"* Creating the transcript takes some time. "
|
83 |
+
"Using the default base transcription model, the process takes approximately 20% of the length of the audio file.\n "
|
84 |
+
"* After uploading the file, **be sure to select the number of speakers**." )
|
85 |
+
|
86 |
+
st.title("Automated Transcription")
|
87 |
+
st.markdown(descript)
|
88 |
+
|
89 |
form = st.form(key='my_form')
|
90 |
uploaded = form.file_uploader("Choose a file")
|
91 |
nu_speakers = form.slider('Number of speakers in audio file:', min_value=1, max_value=6, value=2, step=1)
|