Python: How to play mp3 from gTTS as bytes without saving on disk
Google-Text-To-Speech (shortly gtts) converts text to speech in file MP3 and popular method to play it without saving on disk was to use PyGame
from gtts import gTTS from io import BytesIO text = "Hello World!" # get audio from server tts = gTTS(text=text, lang=lang) # convert to file-like object fp …