Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -34,7 +34,7 @@ def audio_extraction(video_file, output_format):
|
|
34 |
# temp_filename = video_file.name
|
35 |
# video_path = f"{temp_filename}"
|
36 |
audio = extract_audio(
|
37 |
-
input_path=
|
38 |
)
|
39 |
return audio
|
40 |
|
@@ -87,7 +87,7 @@ with file_select_tab:
|
|
87 |
if video_file:
|
88 |
if st.button("Transcribe", key="vidfile"):
|
89 |
with st.spinner("Transcribing..."):
|
90 |
-
audio = audio_extraction(video_file, "mp3")
|
91 |
video_transcript = transcribe_video(audio)
|
92 |
st.success(f"Transcription successful")
|
93 |
st.write(video_transcript)
|
|
|
34 |
# temp_filename = video_file.name
|
35 |
# video_path = f"{temp_filename}"
|
36 |
audio = extract_audio(
|
37 |
+
input_path=video_file, output_path=f"{str(video_file)[:-4]}.mp3", output_format=f"{output_format}"
|
38 |
)
|
39 |
return audio
|
40 |
|
|
|
87 |
if video_file:
|
88 |
if st.button("Transcribe", key="vidfile"):
|
89 |
with st.spinner("Transcribing..."):
|
90 |
+
audio = audio_extraction(os.fspath(video_file), "mp3")
|
91 |
video_transcript = transcribe_video(audio)
|
92 |
st.success(f"Transcription successful")
|
93 |
st.write(video_transcript)
|