Answers for "offline speech to text software"

2

text to speech offline

import pyttsx3

engine = pyttsx3.init('sapi5')
voices = engine.getProperty('voices')
# you can use print(voices) to see how many voices you have installed
# print(voices[0].id)
# print(voices[1].id)
# print(voices[2].id)
print(voices)
engine.setProperty('voices', voices[0].id)

def speak(audio):
  	print(audio)
    engine.say(audio)
    engine.runAndWait()
    
speak('Hello')
Posted by: Guest on May-12-2021

Code answers related to "offline speech to text software"

Python Answers by Framework

Browse Popular Code Answers by Language