Птица-говорун через festival
This commit is contained in:
13
speaker.py
Normal file
13
speaker.py
Normal file
@@ -0,0 +1,13 @@
|
||||
# Модуль отвечающий за голосовое воспроизведение текста
|
||||
# Требует установленный linux-пакет festival
|
||||
|
||||
import subprocess
|
||||
|
||||
def speak(text:str):
|
||||
"""Функция выполняет вызов приложения festival"""
|
||||
if (len(text) > 0):
|
||||
#print(text)
|
||||
process = subprocess.Popen(f'echo "{text}" | festival --tts --language russian', shell=True)
|
||||
process.wait()
|
||||
#time.sleep(5)
|
||||
|
||||
Reference in New Issue
Block a user