File size: 803 Bytes
2986813 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
import streamlit as st
from utlis import *
from st_audiorec import st_audiorec
st.title("Live Speech to Job Offer Generator")
# Capture live audio
wav_audio_data = st_audiorec()
if wav_audio_data is not None:
# Convert audio to text
transcribed_text = audio_to_text(wav_audio_data)
st.markdown("_Transcribed Text:_", unsafe_allow_html=True) # Italicize and center the label
st.markdown(f'<p style="text-align: center;">"{transcribed_text}"</p>', unsafe_allow_html=True) # Center the transcribed text and keep it in quotes
if transcribed_text and st.button("Generate Job Offer"):
# Generate the job offer from the text
job_offer = call_ai_api(transcribed_text)
st.write("Generated Job Offer:")
st.write(job_offer)
|