1
0
mirror of https://github.com/janvarev/Irene-Voice-Assistant.git synced 2025-11-23 22:45:08 +02:00
- добавлен STT через SpeechRecognition
- поправлено ридми, чтобы это отразить
- поправлен plugin_timer.py для работы с числами
- откомментирован plugin_greetings.py
This commit is contained in:
janvarev
2021-12-15 20:19:23 +03:00
parent f14f0f2f22
commit 4a01be63b6
5 changed files with 131 additions and 12 deletions

View File

@@ -63,6 +63,12 @@ def set_timer(core:VACore, phrase:str):
set_timer_real(core,i,txt)
return
txt3 = str(i) + " секунд "
if phrase.startswith(txt3):
#print(txt,txt2)
set_timer_real(core,i,txt)
return
# ставим минуты?
for i in range(1,100):
txt = num_to_text.num2text(i, female_units_min) + " "
@@ -75,6 +81,12 @@ def set_timer(core:VACore, phrase:str):
set_timer_real(core,i*60,txt)
return
txt3 = str(i) + " минут "
if phrase.startswith(txt3):
#print(txt,txt2)
set_timer_real(core,i*60,txt)
return
# без указания единиц измерения - ставим минуты
for i in range(1,100):
txt = num_to_text.num2text(i, female_units_min) + " "
@@ -83,6 +95,12 @@ def set_timer(core:VACore, phrase:str):
set_timer_real(core,i*60,txt)
return
txt3 = str(i)
if phrase.startswith(txt3):
#print(txt,txt2)
set_timer_real(core,i*60,txt)
return
# спецкейс под одну минуту
if phrase.startswith("один ") or phrase.startswith("одна ") or phrase.startswith("одну "):
txt = num_to_text.num2text(1, female_units_min)