In the above code I am able to convert the text 'Hello world' in the speech but how to close the .mp3 that is created. os.remove will not work until that .mp3 file is closed. Please suggest.
I am trying text to speech functionality
import os
from gtts import gTTS
myobj = gTTS(text='Hello world', lang="en", slow=False)
myobj.save("audio1.mp3")
os.startfile('audio1.mp3')