File size: 579 Bytes
0c4afbf
b35d830
 
93c8394
 
 
b35d830
93c8394
b35d830
0c4afbf
b35d830
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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")