1#!/usr/bin/env python3
2# Import playsound module
3from playsound import playsound
4
5# Input an existing wav filename
6wavFile = input("Enter a wav filename: ")
7# Play the wav file
8playsound(wavFile)
9
10# Input an existing mp3 filename
11mp3File = input("Enter a mp3 filename: ")
12# Play the mp3 file
13playsound(mp3File)
1import pyttsx
2engine = pyttsx.init()
3engine.say('Good morning.')
4engine.runAndWait()