![]() This involved showing the date using the datetime package and displaying text using the write() function. The next block of code involves setting up the main displays and buttons. ![]() import streamlit as st import datetime as dt from gtts import gTTS import speech_recognition as sr from google_trans_new import google_translator from PIL import Image I had a few issues initially installing the streamlit library so there may be some issues depending on your version of python. Google translator was then used to convert English text to Japanese. The gtts library is Google’s text-to-speech API to read out the final translation, while the speech_recognition library was used to transcribe the audio. The initial set up of the code involved importing the relevant libraries needed for the app.
0 Comments
Leave a Reply. |