V
V
Vladimir Vaskovskiy2020-07-31 12:39:43
Python
Vladimir Vaskovskiy, 2020-07-31 12:39:43

Why doesn't the pyttsx3 library read text?

The problem is that the code works only when I set the value 'dummy' in the initialization of the engine, with it it will not speak by itself, but without it it simply does not work

import pyttsx3

engine = pyttsx3.init('dummy')     # инициализация движка

# зададим свойства
engine.setProperty('rate', 150)     # скорость речи
engine.setProperty('volume', 0.9)   # громкость (0-1)

engine.say("I can speak!")      # запись фразы в очередь
engine.say("Я могу говорить!")  # запись фразы в очередь

# очистка очереди и воспроизведение текста
engine.runAndWait()

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question