Pyttsx3 запускается, но не выдает звукаPython

Программы на Python
Anonymous
Pyttsx3 запускается, но не выдает звука

Сообщение Anonymous »

Код: Выделить всё

import pyttsx3

# Initialize the engine
engine = pyttsx3.init()

# Adjust speaking rate
rate = engine.getProperty('rate')
print(f'Current speaking rate: {rate}')
engine.setProperty('rate', 125)

# Adjust volume
volume = engine.getProperty('volume')
print(f'Current volume level: {volume}')
engine.setProperty('volume', 1.0)

# Change voice
voices = engine.getProperty('voices')
engine.setProperty('voice', voices[1].id)  # Selecting a female voice

# Make the engine speak
engine.say("Hello World!")
engine.say(f'My current speaking rate is {rate}')

print("test")
engine.runAndWait()

engine.stop()
Я все перепробовал. Python и pyttsx3 установлены в новейшей версии, драйверы обновлены. Код компилируется отлично, без ошибок. Но звука просто не было. Нужно ли мне выполнить какую-либо настройку перед использованием pyttsx3?

Подробнее здесь: https://stackoverflow.com/questions/790 ... t-no-sound

Вернуться в «Python»