#python #py #tts #texttospeech #gtts #sound #playsound

![[Pasted image 20240705142932.png]]
```
# Text To Speech
# Requirements:
# pip3 install gTTS
# pip3 install playsound
# Import Libraries
from gtts import gTTS
from playsound import playsound
audio = 'speech.mp3'
language = 'nl'
strTxt = input("Enter the text: ")
sp = gTTS(text = (strTxt), lang = language,slow=False)
sp.save(audio)
playsound(audio)
```
Zie [[PYTHON, Text to Handwriting]]