feat(voice): Halb-Duplex-Default + Barge-in-Schalter + echter Cancel (E2)

Behebt den Konversations-Mischmasch: (1) Barge-in-Einstellung (Default AUS = Halb-Duplex) gated das Mikro-Lauschen waehrend TTS -> ARIA spricht ungestoert zu Ende. (2) interruptAriaIfBusy bricht die Brain-Antwort WIRKLICH ab (cancel_request) statt nur TTS zu muten -> sie antwortet nicht mehr weiter waehrend man redet. (3) Stop-Button stoppt vorhersehbar alles (TTS + Brain-Cancel). Musik: nativer Focus ist schon GAIN_TRANSIENT (pausiert) -> der saubere Flow behebt das Focus-Geflacker.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-08-15 12:57:24 +02:00
co-authored by Claude Opus 4.8
parent 353fd98d3f
commit e7da9cf9c4
3 changed files with 63 additions and 10 deletions
+19
View File
@@ -160,6 +160,25 @@ export const STT_ENDPOINT_MIN_MS = 1000;
export const STT_ENDPOINT_MAX_MS = 8000; // bis 8s: genug Zeit zum Ueberlegen
export const STT_ENDPOINT_STORAGE_KEY = 'aria_stt_endpoint_ms';
// Barge-in-Modus: darf man ARIA waehrend ihrer TTS-Antwort unterbrechen (reden)?
// Default AUS = sauberes Halb-Duplex (ARIA spricht aus, DANN oeffnet das Mikro —
// kein Selbst-Echo, kein Mischmasch). AN = waehrend TTS auf Wake-Wort lauschen.
export const BARGE_IN_STORAGE_KEY = 'aria_barge_in_enabled';
export async function loadBargeInEnabled(): Promise<boolean> {
try {
return (await AsyncStorage.getItem(BARGE_IN_STORAGE_KEY)) === 'true';
} catch {
return false;
}
}
export async function saveBargeInEnabled(enabled: boolean): Promise<void> {
try {
await AsyncStorage.setItem(BARGE_IN_STORAGE_KEY, String(enabled));
} catch {}
}
export async function loadSttEndpointMs(): Promise<number> {
try {
const raw = await AsyncStorage.getItem(STT_ENDPOINT_STORAGE_KEY);