Fixed fluttery caps speech shifts.

This commit is contained in:
Storm Dragon
2026-01-10 20:49:22 -05:00
parent b8eb815a86
commit 0bb2e52deb
2 changed files with 14 additions and 3 deletions

View File

@@ -65,7 +65,7 @@ class OutputManager:
return
if (len(text) > 1) and (text.strip(string.whitespace) == ""):
return
is_capital = announce_capital and text[0].isupper()
is_capital = self._should_announce_capital(text, announce_capital)
use_pitch_for_capital = False
if is_capital:
@@ -92,6 +92,17 @@ class OutputManager:
text, interrupt, ignore_punctuation, use_pitch_for_capital, flush
)
def _should_announce_capital(self, text, announce_capital):
if not announce_capital or not text:
return False
if len(text) == 1:
return text.isupper()
if any(char.isspace() for char in text):
return False
if not any(char.isalpha() for char in text):
return False
return text.isupper()
def get_last_echo(self):
return self.last_echo

View File

@@ -4,5 +4,5 @@
# Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributors.
version = "2026.01.08"
code_name = "master"
version = "2026.01.10"
code_name = "testing"