When I use pyttsx3 to speak only female voice how can I change it to male rate and frequency doesn't work. please update this code -
import speech_recognition as sr
import pyttsx3
listener = sr.Recognizer()
engine = pyttsx3.init()
engine.say('Hello, I am assistant vocal personnel virtuel')
engine.say('what can i help you with')
engine.runAndWait()
try:
with sr.Microphone() as source:
print('listening...')
voice = listener.listen(source)
command = listener.recognize_google(voice)
command = command.lower()
if 'hey vocal' in command:
print(command)
except:
pass
I am building a voice assistant.