asdrolf commited on
Commit
0b8cd94
1 Parent(s): e394a6d
Files changed (2) hide show
  1. app.py +8 -0
  2. requirements.txt +2 -1
app.py CHANGED
@@ -1,4 +1,5 @@
1
  import streamlit as st
 
2
  from faster_whisper import WhisperModel
3
  from pyannote.audio import Pipeline
4
  import pyannote.core
@@ -61,6 +62,13 @@ def main():
61
  <div class='bywall'>
62
  by Wallner Group
63
  """, unsafe_allow_html=True)
 
 
 
 
 
 
 
64
 
65
  # Opción para cargar archivo de audio
66
  audio_file = st.file_uploader("Cargar archivo de audio", type=['wav'])
 
1
  import streamlit as st
2
+ from streamlit_audio_recorder import st_audio_recorder
3
  from faster_whisper import WhisperModel
4
  from pyannote.audio import Pipeline
5
  import pyannote.core
 
62
  <div class='bywall'>
63
  by Wallner Group
64
  """, unsafe_allow_html=True)
65
+
66
+ audio_data = st_audio_recorder(recording_seconds=300, stt_language="es-ES", key="audio")
67
+
68
+ if audio_data is not None:
69
+ # Guardar el archivo de audio grabado
70
+ with open("audio_temp.wav", "wb") as f:
71
+ f.write(audio_data.getbuffer())
72
 
73
  # Opción para cargar archivo de audio
74
  audio_file = st.file_uploader("Cargar archivo de audio", type=['wav'])
requirements.txt CHANGED
@@ -1,3 +1,4 @@
1
  faster_whisper
2
  pyannote.audio
3
- pyannote.core
 
 
1
  faster_whisper
2
  pyannote.audio
3
+ pyannote.core
4
+ streamlit_audio_recorder