Update app.py
Browse files
app.py
CHANGED
|
@@ -93,7 +93,8 @@ if tab == "Video":
|
|
| 93 |
# Check if transcription and audio file are stored in session state
|
| 94 |
if 'transcription' in st.session_state and 'wav_audio_file' in st.session_state:
|
| 95 |
# Provide the audio file to the user for download
|
| 96 |
-
|
|
|
|
| 97 |
|
| 98 |
# Add download buttons for the transcription and audio
|
| 99 |
# Downloadable transcription file
|
|
@@ -148,7 +149,8 @@ elif tab == "Audio":
|
|
| 148 |
# Check if transcription and audio file are stored in session state
|
| 149 |
if 'transcription_audio' in st.session_state and 'wav_audio_file_audio' in st.session_state:
|
| 150 |
# Provide the audio file to the user for download
|
| 151 |
-
|
|
|
|
| 152 |
|
| 153 |
# Add download buttons for the transcription and audio
|
| 154 |
# Downloadable transcription file
|
|
|
|
| 93 |
# Check if transcription and audio file are stored in session state
|
| 94 |
if 'transcription' in st.session_state and 'wav_audio_file' in st.session_state:
|
| 95 |
# Provide the audio file to the user for download
|
| 96 |
+
with open(st.session_state.wav_audio_file, "rb") as audio_file_data:
|
| 97 |
+
st.audio(audio_file_data.read(), format='audio/wav')
|
| 98 |
|
| 99 |
# Add download buttons for the transcription and audio
|
| 100 |
# Downloadable transcription file
|
|
|
|
| 149 |
# Check if transcription and audio file are stored in session state
|
| 150 |
if 'transcription_audio' in st.session_state and 'wav_audio_file_audio' in st.session_state:
|
| 151 |
# Provide the audio file to the user for download
|
| 152 |
+
with open(st.session_state.wav_audio_file_audio, "rb") as audio_file_data:
|
| 153 |
+
st.audio(audio_file_data.read(), format='audio/wav')
|
| 154 |
|
| 155 |
# Add download buttons for the transcription and audio
|
| 156 |
# Downloadable transcription file
|