corfostreamdemo / app.py
sergiolucero's picture
Update app.py
93c8394 verified
raw
history blame
579 Bytes
import streamlit as st
from audiolib import grabar_audio, transcribir_audio
##################################################
st.subheader("CORFO-CETRAM: Transcripción LIVE")
if 'paciente' not in st.session_state: # learn to use!
st.session_state.paciente = 9911
audio = st.button("Grabar audio", key='grabar', type="primary")
while True:
if audio:
frames = grabar_audio()
transcripcion = transcribir_audio(frames)
if transcripcion:
st.write(transcripcion)
else:
st.write("Error al transcribir el audio")