Answers for "how to play audio from text in pytho"

1

text to sound python

#pip3 install pyttsx3
#apt-get install alsa-utils
import pyttsx3, time 
engine = pyttsx3.init() 
engine.say("Hi, I am text to speach") 
engine.runAndWait()
Posted by: Guest on July-06-2020
-1

how to play audio in python

# import required module
from playsound import playsound

# for playing note.wav file
playsound('/path/note.wav')
print('playing sound using playsound')
Posted by: Guest on January-02-2022

Python Answers by Framework

Browse Popular Code Answers by Language