Update assistant features and docs
This commit is contained in:
@@ -9,6 +9,7 @@ Regulates system volume on a scale from 1 to 10.
|
||||
import subprocess
|
||||
import re
|
||||
import platform
|
||||
from ..core.roman import replace_roman_numerals
|
||||
|
||||
# Карта для перевода слов в цифры ("пять" -> 5)
|
||||
NUMBER_MAP = {
|
||||
@@ -148,7 +149,7 @@ def parse_volume_text(text: str) -> int | None:
|
||||
Пытается найти число громкости в тексте.
|
||||
Понимает и цифры ("5"), и слова ("пять").
|
||||
"""
|
||||
text = text.lower()
|
||||
text = replace_roman_numerals(text.lower())
|
||||
|
||||
# 1. Ищем цифры (1-10)
|
||||
num_match = re.search(r"\b(10|[1-9])\b", text)
|
||||
|
||||
Reference in New Issue
Block a user