fix short word, no yes not speaking

This commit is contained in:
duffyduck 2025-12-30 19:41:47 +01:00
parent cb0bd4589c
commit 0ee66e50bf
1 changed files with 11 additions and 4 deletions

View File

@ -1068,9 +1068,16 @@ Erst wenn ich [READY] sehe, starten die TICKs mit Bildern!"""
if self.is_muted() or self._speaking.is_set():
continue
if result and result.text and len(result.text) > 2:
# Sprache erkannt!
current_session_texts.append(result.text)
if result and result.text and result.text.strip():
# Sprache erkannt! Akzeptiere auch kurze Worte wie "Ja", "Nein", "OK"
text = result.text.strip()
# Nur offensichtliches Rauschen filtern (einzelne Buchstaben)
if len(text) == 1:
logger.debug(f"STT: Einzelner Buchstabe ignoriert: '{text}'")
continue
current_session_texts.append(text)
last_speech_time = time.time()
self.stats.stefan_inputs += 1
@ -1080,7 +1087,7 @@ Erst wenn ich [READY] sehe, starten die TICKs mit Bildern!"""
console.print(f"\n[bold green]🎤 Stefan spricht...[/bold green]")
logger.debug("Recording gestartet")
console.print(f"[green] → {result.text}[/green]")
console.print(f"[green] → {text}[/green]")
logger.debug(f"Stefan-Session: {len(current_session_texts)} Teile")
else: