play sound in python without media player code example
Example 1: Play sound in python
import winsound
winsound.PlaySound('sound.wav', winsound.SND_FILENAME)
Example 2: play sound directly with pytts
import pyttsx
engine = pyttsx.init()
engine.say('Good morning.')
engine.runAndWait()