************** Text to speech ************** Download all scripts: :download:`text_to_speech.zip ` Set up a virtual environment ============================ https://docs.python.org/3/tutorial/venv.html .. code-block:: bash # macOS or Unix # Create a new virtual environment python3 -m venv venv-COURSE # Activate the virtual environment source venv-COURSE/bin/activate # Install gTTS (Google Text-to-Speech) pip install gTTS .. code-block:: powershell # Windows # Create a new virtual environment py -m venv venv-COURSE # Activate the virtual environment venv-COURSE\Scripts\activate.bat # Install gTTS (Google Text-to-Speech) pip install gTTS text_to_speech.py ================= .. literalinclude:: text_to_speech/text_to_speech.py :language: python3 the_time_is.py ============== .. literalinclude:: text_to_speech/the_time_is.py :language: python3 the_time_is_multilingual.py =========================== .. literalinclude:: text_to_speech/the_time_is_multilingual.py :language: python3