Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 7682a0ce58 | |||
| 3ca834e633 |
@@ -79,8 +79,8 @@ android {
|
|||||||
applicationId "com.ariacockpit"
|
applicationId "com.ariacockpit"
|
||||||
minSdkVersion rootProject.ext.minSdkVersion
|
minSdkVersion rootProject.ext.minSdkVersion
|
||||||
targetSdkVersion rootProject.ext.targetSdkVersion
|
targetSdkVersion rootProject.ext.targetSdkVersion
|
||||||
versionCode 707
|
versionCode 708
|
||||||
versionName "0.0.7.7"
|
versionName "0.0.7.8"
|
||||||
// Fallback fuer Libraries mit Product Flavors
|
// Fallback fuer Libraries mit Product Flavors
|
||||||
missingDimensionStrategy 'react-native-camera', 'general'
|
missingDimensionStrategy 'react-native-camera', 'general'
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "aria-cockpit",
|
"name": "aria-cockpit",
|
||||||
"version": "0.0.7.7",
|
"version": "0.0.7.8",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"android": "react-native run-android",
|
"android": "react-native run-android",
|
||||||
|
|||||||
@@ -535,6 +535,7 @@ const ChatScreen: React.FC = () => {
|
|||||||
audioRequestId,
|
audioRequestId,
|
||||||
...(location && { location }),
|
...(location && { location }),
|
||||||
});
|
});
|
||||||
|
scheduleStaleAudioCleanup(audioRequestId);
|
||||||
// resume() wird durch onPlaybackFinished nach ARIAs Antwort getriggert.
|
// resume() wird durch onPlaybackFinished nach ARIAs Antwort getriggert.
|
||||||
} else {
|
} else {
|
||||||
// Kein Speech im Window → Konversation beenden (Ohr geht aus oder
|
// Kein Speech im Window → Konversation beenden (Ohr geht aus oder
|
||||||
@@ -656,6 +657,25 @@ const ChatScreen: React.FC = () => {
|
|||||||
|
|
||||||
// --- Nachricht senden ---
|
// --- Nachricht senden ---
|
||||||
|
|
||||||
|
// Aufraeumen von "verarbeitet"-Placeholder die nie ein STT-Result bekommen
|
||||||
|
// haben (leere Aufnahme, Wake-Word-Echo, STT-Fehler etc). Nach 30s werden
|
||||||
|
// sie automatisch entfernt damit nicht-erkannte Aufnahmen nicht den State
|
||||||
|
// verstopfen + naechste echte Aufnahmen die richtige Bubble ersetzen koennen.
|
||||||
|
const scheduleStaleAudioCleanup = useCallback((audioRequestId: string) => {
|
||||||
|
setTimeout(() => {
|
||||||
|
setMessages(prev => {
|
||||||
|
const idx = prev.findIndex(m =>
|
||||||
|
m.audioRequestId === audioRequestId &&
|
||||||
|
m.text.includes('Spracheingabe wird verarbeitet')
|
||||||
|
);
|
||||||
|
if (idx < 0) return prev;
|
||||||
|
console.log('[Chat] Sprachnachricht ohne STT-Result entfernt: %s', audioRequestId);
|
||||||
|
ToastAndroid.show('Sprachnachricht nicht erkannt — entfernt', ToastAndroid.SHORT);
|
||||||
|
return prev.filter((_, i) => i !== idx);
|
||||||
|
});
|
||||||
|
}, 30000);
|
||||||
|
}, []);
|
||||||
|
|
||||||
const sendTextMessage = useCallback(async () => {
|
const sendTextMessage = useCallback(async () => {
|
||||||
const text = inputText.trim();
|
const text = inputText.trim();
|
||||||
|
|
||||||
@@ -743,7 +763,8 @@ const ChatScreen: React.FC = () => {
|
|||||||
audioRequestId,
|
audioRequestId,
|
||||||
...(location && { location }),
|
...(location && { location }),
|
||||||
});
|
});
|
||||||
}, [getCurrentLocation, interruptAriaIfBusy]);
|
scheduleStaleAudioCleanup(audioRequestId);
|
||||||
|
}, [getCurrentLocation, interruptAriaIfBusy, scheduleStaleAudioCleanup]);
|
||||||
|
|
||||||
// Datei auswaehlen → zur Pending-Liste hinzufuegen
|
// Datei auswaehlen → zur Pending-Liste hinzufuegen
|
||||||
const handleFileSelected = useCallback(async (file: FileData) => {
|
const handleFileSelected = useCallback(async (file: FileData) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user