to do that we need to install pyttsx3 first
go to pip and install.
import pyttsx3
import cv2
import numpy as np
engine = pyttsx3.init()
rate = engine.getProperty('rate')
engine.setProperty('rate', rate-70)
engine.setProperty('volume', 0.9)
engine.say('Hey stranger')
engine.runAndWait()
the main content goes in say method ,u can also put your content
in a text file and read it from there. it should help people who want to
speak and could not .
Comments
Post a Comment