0
import pyttsx3
import speech_recognition as sr
import sys

def talk(words):
    engine=pyttsx3.init("dummy")
    engine.say(words)
    engine.runAndWait()

talk("Hi")

Ничего не произносится, хотя программа успешно завершает выполнение

4
  • pyttsx3.init("dummy"), dummy ??? 19 сен 2020 в 11:26
  • Без dummy выдает ошибку 19 сен 2020 в 11:29
  • какую?????????? 19 сен 2020 в 11:30
  • Traceback (most recent call last): File "C:\Users\79220\AppData\Local\Programs\Python\Python38-32\lib\site-packages\pyttsx3_init_.py", line 20, in init eng = _activeEngines[driverName] File "C:\Users\79220\AppData\Local\Programs\Python\Python38-32\lib\weakref.py", line 131, in getitem o = self.data[key]() KeyError: None During handling of the above exception, another exception occurred: 19 сен 2020 в 16:49

1 ответ 1

0

Может быть?

import pyttsx3
import speech_recognition as sr
import sys

def talk(words):
    engine=pyttsx3.init("dummy")
    engine.say(words)
    engine.runAndWait()

talk("Hi")
0

Ваш ответ

By clicking “Отправить ответ”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Всё ещё ищете ответ? Посмотрите другие вопросы с метками или задайте свой вопрос.