from gtts import gTTS
import winsound
Text = "Hello world"
Audio = gTTS(text=Text,lang="en",slow=False)
Audio.save("T.wav")
winsound.PlaySound("T.wav", winsound.SND_FILENAME)
When the code is run there are no errors but a default windows alert sound is played instead of the test.wav file.