Update app.py
Browse files45 unmodified lines46474849505152535455565758596045 unmodified linesinput_method = st.radio("Choose input method:", ("Type", "Record"))if input_method == "Type":entry = st.text_area("Write your diary entry:", entries.get(date_str, ""))else:st.write("Click the microphone icon below to start recording:")audio_bytes = audio_recorder()if audio_bytes:st.audio(audio_bytes, format="audio/wav")st.write("Converting speech to text...")entry = speech_to_text(audio_bytes)st.write("Transcribed text:", entry)else:entry = entries.get(date_str, "")45 unmodified lines464748495051525354555657585960616245 unmodified linesinput_method = st.radio("Choose input method:", ("Type", "Record"))if input_method == "Type":entry = st.text_area("Write your diary entry:", entries.get(date_str, ""), height=300)else:st.write("Click the microphone icon below to start recording:")audio_bytes = audio_recorder()if audio_bytes:st.audio(audio_bytes, format="audio/wav")st.write("Converting speech to text...")transcribed_text = speech_to_text(audio_bytes)st.write("Transcribed text:")entry = st.text_area("Edit your transcribed entry:", transcribed_text, height=300)st.info("You can edit the transcribed text above to correct any errors.")else:entry = entries.get(date_str, "")
app.py+5-3