Compare commits
22 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 4bbc6f7787 | |||
| 20f2ea1829 | |||
| 2d23f0668b | |||
| d6030a06b7 | |||
| 0df76e2af6 | |||
| f80fe1df93 | |||
| cff421bc53 | |||
| bca925d385 | |||
| 9abde89805 | |||
| ea4f639fcb | |||
| 64cd5f7d52 | |||
| 843ebe1d8f | |||
| 764619f076 | |||
| e3a0cfb55a | |||
| 2929749314 | |||
| 51b9512f4e | |||
| ffcfa44eef | |||
| 6363da97b1 | |||
| 07ed2cdcf6 | |||
| 5ad68b7dfc | |||
| 8a6ee018ea | |||
| b42590ff95 |
@@ -306,7 +306,8 @@ aria-core → Antwort → Gateway → Diagnostic → RVS → App
|
|||||||
### Features
|
### Features
|
||||||
|
|
||||||
- **STT**: faster-whisper (lokal, offline, 16kHz mono)
|
- **STT**: faster-whisper (lokal, offline, 16kHz mono)
|
||||||
- **TTS**: Piper (Ramona + Thorsten, offline)
|
- **TTS**: Piper (Ramona + Thorsten, offline) oder XTTS v2 (remote, GPU, Voice Cloning)
|
||||||
|
- **Markdown-Bereinigung**: Entfernt **fett**, *kursiv*, `code`, Links, Listen etc. vor TTS (natuerliche Sprache)
|
||||||
- **Wake-Word**: openwakeword (lokales Mikrofon auf der VM)
|
- **Wake-Word**: openwakeword (lokales Mikrofon auf der VM)
|
||||||
- **App-Audio**: Base64 Audio von App → FFmpeg → Whisper STT → Text an aria-core
|
- **App-Audio**: Base64 Audio von App → FFmpeg → Whisper STT → Text an aria-core
|
||||||
- **Modi**: Normal, Nicht stoeren, Fluestern, Hangar, Gaming
|
- **Modi**: Normal, Nicht stoeren, Fluestern, Hangar, Gaming
|
||||||
@@ -367,15 +368,17 @@ API-Endpoint fuer andere Services: `GET http://localhost:3001/api/session`
|
|||||||
|
|
||||||
- Text-Chat mit ARIA
|
- Text-Chat mit ARIA
|
||||||
- **Sprachaufnahme**: Push-to-Talk (halten) oder Tap-to-Talk (tippen, Auto-Stop bei Stille)
|
- **Sprachaufnahme**: Push-to-Talk (halten) oder Tap-to-Talk (tippen, Auto-Stop bei Stille)
|
||||||
|
- **Gespraechsmodus** (Ohr-Button): Nach jeder ARIA-Antwort startet automatisch die Aufnahme — wie ein natuerliches Gespraech hin und her, ohne Buttons druecken
|
||||||
- **VAD (Voice Activity Detection)**: Erkennt 1.8s Stille und stoppt automatisch
|
- **VAD (Voice Activity Detection)**: Erkennt 1.8s Stille und stoppt automatisch
|
||||||
- **STT (Speech-to-Text)**: Audio wird in der Bridge per Whisper transkribiert, transkribierter Text erscheint im Chat
|
- **STT (Speech-to-Text)**: Audio wird in der Bridge per Whisper transkribiert, transkribierter Text erscheint im Chat
|
||||||
- **TTS-Wiedergabe**: ARIA antwortet per Lautsprecher (Piper oder XTTS v2)
|
- **TTS-Wiedergabe**: ARIA antwortet per Lautsprecher (Piper oder XTTS v2), Audio-Queue mit Preloading
|
||||||
- **Play-Button**: Jede ARIA-Nachricht kann nochmal vorgelesen werden
|
- **Play-Button**: Jede ARIA-Nachricht kann nochmal vorgelesen werden
|
||||||
- **Chat-Suche**: Lupe in der Statusleiste filtert Nachrichten live
|
- **Chat-Suche**: Lupe in der Statusleiste filtert Nachrichten live
|
||||||
- **Datei- und Bild-Upload**: Bilder inline im Chat (Vollbild-Tap), Dateien mit Icon + Name + Groesse
|
- **Mehrere Anhaenge**: Bilder + Dateien sammeln, Text hinzufuegen, dann zusammen senden
|
||||||
|
- **Paste-Support**: Bilder aus Zwischenablage einfuegen (Diagnostic)
|
||||||
- **Anhaenge**: Bridge speichert in Shared Volume, ARIA kann darauf zugreifen, Re-Download ueber RVS
|
- **Anhaenge**: Bridge speichert in Shared Volume, ARIA kann darauf zugreifen, Re-Download ueber RVS
|
||||||
- **Einstellungen**: TTS Engine, Stimmen, Speed pro Stimme, Speicherort, Auto-Download, GPS
|
- **Einstellungen**: TTS Engine, Stimmen, Speed pro Stimme, Speicherort, Auto-Download, GPS
|
||||||
- **Auto-Update**: Prueft beim Start auf neue Version, Download + Installation ueber RVS
|
- **Auto-Update**: Prueft beim Start + per Button auf neue Version, Download + Installation ueber RVS (FileProvider)
|
||||||
- GPS-Position (optional)
|
- GPS-Position (optional)
|
||||||
- QR-Code Scanner fuer Token-Pairing
|
- QR-Code Scanner fuer Token-Pairing
|
||||||
|
|
||||||
@@ -709,6 +712,11 @@ docker exec aria-core ssh aria-wohnung hostname
|
|||||||
- [x] Auto-Update System (APK via RVS)
|
- [x] Auto-Update System (APK via RVS)
|
||||||
- [x] Chat-Suche, Play-Button, Abbrechen-Button
|
- [x] Chat-Suche, Play-Button, Abbrechen-Button
|
||||||
- [x] XTTS v2 Integration (GPU, Voice Cloning, remote ueber RVS)
|
- [x] XTTS v2 Integration (GPU, Voice Cloning, remote ueber RVS)
|
||||||
|
- [x] Gespraechsmodus (Ohr-Button, automatische Aufnahme nach ARIA-Antwort)
|
||||||
|
- [x] Mehrere Anhaenge + Text vor dem Senden + Paste-Support
|
||||||
|
- [x] Markdown-Bereinigung fuer TTS
|
||||||
|
- [x] Auto-Update mit FileProvider + Update-Check Button
|
||||||
|
- [x] Inverted FlatList (zuverlaessiges Scroll-to-Bottom)
|
||||||
|
|
||||||
### Phase 2 — ARIA wird produktiv
|
### Phase 2 — ARIA wird produktiv
|
||||||
|
|
||||||
|
|||||||
@@ -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 302
|
versionCode 307
|
||||||
versionName "0.0.3.2"
|
versionName "0.0.3.7"
|
||||||
// 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.3.2",
|
"version": "0.0.3.7",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"android": "react-native run-android",
|
"android": "react-native run-android",
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
* Datei- und Kamera-Upload.
|
* Datei- und Kamera-Upload.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import React, { useState, useEffect, useRef, useCallback } from 'react';
|
import React, { useState, useEffect, useRef, useCallback, useMemo } from 'react';
|
||||||
import {
|
import {
|
||||||
View,
|
View,
|
||||||
Text,
|
Text,
|
||||||
@@ -16,6 +16,7 @@ import {
|
|||||||
Platform,
|
Platform,
|
||||||
StyleSheet,
|
StyleSheet,
|
||||||
Image,
|
Image,
|
||||||
|
ScrollView,
|
||||||
Modal,
|
Modal,
|
||||||
} from 'react-native';
|
} from 'react-native';
|
||||||
import AsyncStorage from '@react-native-async-storage/async-storage';
|
import AsyncStorage from '@react-native-async-storage/async-storage';
|
||||||
@@ -94,6 +95,7 @@ const ChatScreen: React.FC = () => {
|
|||||||
const [fullscreenImage, setFullscreenImage] = useState<string | null>(null);
|
const [fullscreenImage, setFullscreenImage] = useState<string | null>(null);
|
||||||
const [searchQuery, setSearchQuery] = useState('');
|
const [searchQuery, setSearchQuery] = useState('');
|
||||||
const [searchVisible, setSearchVisible] = useState(false);
|
const [searchVisible, setSearchVisible] = useState(false);
|
||||||
|
const [pendingAttachments, setPendingAttachments] = useState<{file: any, isPhoto: boolean}[]>([]);
|
||||||
|
|
||||||
const flatListRef = useRef<FlatList>(null);
|
const flatListRef = useRef<FlatList>(null);
|
||||||
const messageIdCounter = useRef(0);
|
const messageIdCounter = useRef(0);
|
||||||
@@ -273,12 +275,20 @@ const ChatScreen: React.FC = () => {
|
|||||||
return () => { unsubUpdate(); clearTimeout(timer); };
|
return () => { unsubUpdate(); clearTimeout(timer); };
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
// Wake Word: "ARIA" Erkennung → Auto-Aufnahme starten
|
// Gespraechsmodus: Nach TTS-Wiedergabe automatisch Aufnahme starten
|
||||||
|
useEffect(() => {
|
||||||
|
const unsubPlayback = audioService.onPlaybackFinished(() => {
|
||||||
|
if (wakeWordService.isActive()) {
|
||||||
|
wakeWordService.resume();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return () => unsubPlayback();
|
||||||
|
}, []);
|
||||||
|
|
||||||
|
// Wake Word / Gespraechsmodus: Auto-Aufnahme starten
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const unsubWake = wakeWordService.onWakeWord(async () => {
|
const unsubWake = wakeWordService.onWakeWord(async () => {
|
||||||
console.log('[Chat] Wake Word erkannt — starte Auto-Aufnahme');
|
console.log('[Chat] Gespraechsmodus — starte Auto-Aufnahme');
|
||||||
// TTS stoppen damit ARIA sich nicht selbst hoert
|
|
||||||
audioService.stopPlayback();
|
|
||||||
// Aufnahme mit Auto-Stop (VAD) starten
|
// Aufnahme mit Auto-Stop (VAD) starten
|
||||||
const started = await audioService.startRecording(true);
|
const started = await audioService.startRecording(true);
|
||||||
if (!started) {
|
if (!started) {
|
||||||
@@ -359,22 +369,8 @@ const ChatScreen: React.FC = () => {
|
|||||||
return () => { if (saveTimer.current) clearTimeout(saveTimer.current); };
|
return () => { if (saveTimer.current) clearTimeout(saveTimer.current); };
|
||||||
}, [messages]);
|
}, [messages]);
|
||||||
|
|
||||||
// Auto-Scroll wird ueber onContentSizeChange der FlatList gesteuert
|
// Inverted FlatList: neueste Nachrichten unten, kein manuelles Scrollen noetig
|
||||||
const shouldAutoScroll = useRef(true);
|
const invertedMessages = useMemo(() => [...messages].reverse(), [messages]);
|
||||||
const handleContentSizeChange = useCallback(() => {
|
|
||||||
if (shouldAutoScroll.current) {
|
|
||||||
flatListRef.current?.scrollToEnd({ animated: false });
|
|
||||||
}
|
|
||||||
}, []);
|
|
||||||
const handleScrollBeginDrag = useCallback(() => {
|
|
||||||
shouldAutoScroll.current = false;
|
|
||||||
}, []);
|
|
||||||
const handleScrollEndDrag = useCallback((e: any) => {
|
|
||||||
// Auto-Scroll wieder aktivieren wenn User ganz unten ist
|
|
||||||
const { contentOffset, contentSize, layoutMeasurement } = e.nativeEvent;
|
|
||||||
const isAtBottom = contentOffset.y + layoutMeasurement.height >= contentSize.height - 50;
|
|
||||||
shouldAutoScroll.current = isAtBottom;
|
|
||||||
}, []);
|
|
||||||
|
|
||||||
// GPS-Position holen (optional)
|
// GPS-Position holen (optional)
|
||||||
const getCurrentLocation = useCallback((): Promise<{ lat: number; lon: number } | null> => {
|
const getCurrentLocation = useCallback((): Promise<{ lat: number; lon: number } | null> => {
|
||||||
@@ -400,6 +396,13 @@ const ChatScreen: React.FC = () => {
|
|||||||
|
|
||||||
const sendTextMessage = useCallback(async () => {
|
const sendTextMessage = useCallback(async () => {
|
||||||
const text = inputText.trim();
|
const text = inputText.trim();
|
||||||
|
|
||||||
|
// Wenn pending Anhaenge vorhanden → Anhaenge + Text zusammen senden
|
||||||
|
if (pendingAttachments.length > 0) {
|
||||||
|
sendPendingAttachments(text);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (!text) return;
|
if (!text) return;
|
||||||
|
|
||||||
setInputText('');
|
setInputText('');
|
||||||
@@ -419,7 +422,7 @@ const ChatScreen: React.FC = () => {
|
|||||||
text,
|
text,
|
||||||
...(location && { location }),
|
...(location && { location }),
|
||||||
});
|
});
|
||||||
}, [inputText, getCurrentLocation]);
|
}, [inputText, getCurrentLocation, pendingAttachments, sendPendingAttachments]);
|
||||||
|
|
||||||
// Sprachaufnahme abgeschlossen
|
// Sprachaufnahme abgeschlossen
|
||||||
const handleVoiceRecording = useCallback(async (result: RecordingResult) => {
|
const handleVoiceRecording = useCallback(async (result: RecordingResult) => {
|
||||||
@@ -441,88 +444,91 @@ const ChatScreen: React.FC = () => {
|
|||||||
});
|
});
|
||||||
}, [getCurrentLocation]);
|
}, [getCurrentLocation]);
|
||||||
|
|
||||||
// Datei senden
|
// Datei auswaehlen → zur Pending-Liste hinzufuegen
|
||||||
const handleFileSelected = useCallback(async (file: FileData) => {
|
const handleFileSelected = useCallback(async (file: FileData) => {
|
||||||
setShowFileUpload(false);
|
setShowFileUpload(false);
|
||||||
const location = await getCurrentLocation();
|
setPendingAttachments(prev => [...prev, { file, isPhoto: false }]);
|
||||||
|
}, []);
|
||||||
|
|
||||||
const isImage = file.type.startsWith('image/');
|
// Foto auswaehlen → zur Pending-Liste hinzufuegen
|
||||||
const msgId = nextId();
|
|
||||||
let imageUri = isImage && file.base64 ? `data:${file.type};base64,${file.base64}` : file.uri;
|
|
||||||
|
|
||||||
const userMsg: ChatMessage = {
|
|
||||||
id: msgId,
|
|
||||||
sender: 'user',
|
|
||||||
text: 'Anhang empfangen',
|
|
||||||
timestamp: Date.now(),
|
|
||||||
attachments: [{
|
|
||||||
type: isImage ? 'image' : 'file',
|
|
||||||
name: file.name,
|
|
||||||
size: file.size,
|
|
||||||
uri: imageUri,
|
|
||||||
mimeType: file.type,
|
|
||||||
}],
|
|
||||||
};
|
|
||||||
setMessages(prev => [...prev, userMsg]);
|
|
||||||
|
|
||||||
// Anhang auf Disk speichern fuer Persistenz
|
|
||||||
if (file.base64) {
|
|
||||||
persistAttachment(file.base64, msgId, file.name).then(filePath => {
|
|
||||||
setMessages(prev => prev.map(m =>
|
|
||||||
m.id === msgId ? { ...m, attachments: m.attachments?.map(a => ({ ...a, uri: filePath })) } : m
|
|
||||||
));
|
|
||||||
}).catch(() => {});
|
|
||||||
}
|
|
||||||
|
|
||||||
rvs.send('file', {
|
|
||||||
name: file.name,
|
|
||||||
type: file.type,
|
|
||||||
size: file.size,
|
|
||||||
base64: file.base64,
|
|
||||||
...(location && { location }),
|
|
||||||
});
|
|
||||||
}, [getCurrentLocation]);
|
|
||||||
|
|
||||||
// Foto senden
|
|
||||||
const handlePhotoSelected = useCallback(async (photo: PhotoData) => {
|
const handlePhotoSelected = useCallback(async (photo: PhotoData) => {
|
||||||
setShowCameraUpload(false);
|
setShowCameraUpload(false);
|
||||||
|
setPendingAttachments(prev => [...prev, { file: photo, isPhoto: true }]);
|
||||||
|
}, []);
|
||||||
|
|
||||||
|
// Alle Pending Anhaenge + Text senden
|
||||||
|
const sendPendingAttachments = useCallback(async (messageText: string) => {
|
||||||
|
if (pendingAttachments.length === 0) return;
|
||||||
const location = await getCurrentLocation();
|
const location = await getCurrentLocation();
|
||||||
|
|
||||||
const msgId = nextId();
|
const msgId = nextId();
|
||||||
const dataUri = photo.base64 ? `data:${photo.type};base64,${photo.base64}` : undefined;
|
|
||||||
|
|
||||||
|
// Alle Attachments fuer die Chat-Nachricht sammeln
|
||||||
|
const attachments: Attachment[] = [];
|
||||||
|
for (const { file, isPhoto } of pendingAttachments) {
|
||||||
|
const isImage = isPhoto || (file.type && file.type.startsWith('image/'));
|
||||||
|
const name = isPhoto ? file.fileName : file.name;
|
||||||
|
const base64 = file.base64 || '';
|
||||||
|
const mimeType = file.type || '';
|
||||||
|
const imageUri = isImage && base64 ? `data:${mimeType};base64,${base64}` : file.uri;
|
||||||
|
|
||||||
|
attachments.push({
|
||||||
|
type: isImage ? 'image' : 'file',
|
||||||
|
name,
|
||||||
|
size: file.size,
|
||||||
|
uri: imageUri,
|
||||||
|
mimeType,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// Chat-Nachricht mit allen Anhaengen
|
||||||
const userMsg: ChatMessage = {
|
const userMsg: ChatMessage = {
|
||||||
id: msgId,
|
id: msgId,
|
||||||
sender: 'user',
|
sender: 'user',
|
||||||
text: 'Anhang empfangen',
|
text: messageText || `${pendingAttachments.length} Anhang/Anhaenge`,
|
||||||
timestamp: Date.now(),
|
timestamp: Date.now(),
|
||||||
attachments: [{
|
attachments,
|
||||||
type: 'image',
|
|
||||||
name: photo.fileName,
|
|
||||||
uri: dataUri,
|
|
||||||
mimeType: photo.type,
|
|
||||||
}],
|
|
||||||
};
|
};
|
||||||
setMessages(prev => [...prev, userMsg]);
|
setMessages(prev => [...prev, userMsg]);
|
||||||
|
|
||||||
// Foto auf Disk speichern fuer Persistenz
|
// Alle Dateien an RVS senden + auf Disk speichern
|
||||||
if (photo.base64) {
|
for (const { file, isPhoto } of pendingAttachments) {
|
||||||
persistAttachment(photo.base64, msgId, photo.fileName).then(filePath => {
|
const name = isPhoto ? file.fileName : file.name;
|
||||||
setMessages(prev => prev.map(m =>
|
const base64 = file.base64 || '';
|
||||||
m.id === msgId ? { ...m, attachments: m.attachments?.map(a => ({ ...a, uri: filePath })) } : m
|
const mimeType = file.type || '';
|
||||||
));
|
|
||||||
}).catch(() => {});
|
// Auf Disk speichern
|
||||||
|
if (base64) {
|
||||||
|
persistAttachment(base64, msgId + '_' + name, name).then(filePath => {
|
||||||
|
setMessages(prev => prev.map(m =>
|
||||||
|
m.id === msgId ? { ...m, attachments: m.attachments?.map(a =>
|
||||||
|
a.name === name && !a.uri?.startsWith('file://') ? { ...a, uri: filePath } : a
|
||||||
|
)} : m
|
||||||
|
));
|
||||||
|
}).catch(() => {});
|
||||||
|
}
|
||||||
|
|
||||||
|
// An RVS senden
|
||||||
|
rvs.send('file', {
|
||||||
|
name,
|
||||||
|
type: mimeType,
|
||||||
|
size: file.size,
|
||||||
|
base64,
|
||||||
|
...(isPhoto && file.width && { width: file.width, height: file.height }),
|
||||||
|
...(location && { location }),
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
rvs.send('file', {
|
// Text als separate Nachricht (damit ARIA weiss was zu tun ist)
|
||||||
name: photo.fileName,
|
if (messageText) {
|
||||||
type: photo.type,
|
rvs.send('chat', {
|
||||||
base64: photo.base64,
|
text: messageText,
|
||||||
width: photo.width,
|
...(location && { location }),
|
||||||
height: photo.height,
|
});
|
||||||
...(location && { location }),
|
}
|
||||||
});
|
|
||||||
}, [getCurrentLocation]);
|
setPendingAttachments([]);
|
||||||
|
setInputText('');
|
||||||
|
}, [pendingAttachments, getCurrentLocation]);
|
||||||
|
|
||||||
// --- Rendering ---
|
// --- Rendering ---
|
||||||
|
|
||||||
@@ -653,14 +659,12 @@ const ChatScreen: React.FC = () => {
|
|||||||
{/* Nachrichtenliste */}
|
{/* Nachrichtenliste */}
|
||||||
<FlatList
|
<FlatList
|
||||||
ref={flatListRef}
|
ref={flatListRef}
|
||||||
data={searchQuery ? messages.filter(m => m.text.toLowerCase().includes(searchQuery.toLowerCase())) : messages}
|
inverted
|
||||||
|
data={searchQuery ? messages.filter(m => m.text.toLowerCase().includes(searchQuery.toLowerCase())).reverse() : invertedMessages}
|
||||||
keyExtractor={item => item.id}
|
keyExtractor={item => item.id}
|
||||||
renderItem={renderMessage}
|
renderItem={renderMessage}
|
||||||
contentContainerStyle={styles.messageList}
|
contentContainerStyle={styles.messageList}
|
||||||
showsVerticalScrollIndicator={false}
|
showsVerticalScrollIndicator={false}
|
||||||
onContentSizeChange={handleContentSizeChange}
|
|
||||||
onScrollBeginDrag={handleScrollBeginDrag}
|
|
||||||
onScrollEndDrag={handleScrollEndDrag}
|
|
||||||
ListEmptyComponent={
|
ListEmptyComponent={
|
||||||
<View style={styles.emptyContainer}>
|
<View style={styles.emptyContainer}>
|
||||||
<Text style={styles.emptyIcon}>{'\uD83E\uDD16'}</Text>
|
<Text style={styles.emptyIcon}>{'\uD83E\uDD16'}</Text>
|
||||||
@@ -670,6 +674,40 @@ const ChatScreen: React.FC = () => {
|
|||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
{/* Pending Anhaenge Vorschau */}
|
||||||
|
{pendingAttachments.length > 0 && (
|
||||||
|
<View style={styles.pendingBar}>
|
||||||
|
<ScrollView horizontal showsHorizontalScrollIndicator={false} style={{flex: 1}}>
|
||||||
|
{pendingAttachments.map((att, idx) => (
|
||||||
|
<View key={idx} style={styles.pendingItem}>
|
||||||
|
{att.file.type?.startsWith('image/') || att.isPhoto ? (
|
||||||
|
<Image
|
||||||
|
source={{ uri: att.file.base64
|
||||||
|
? `data:${att.file.type};base64,${att.file.base64}`
|
||||||
|
: att.file.uri }}
|
||||||
|
style={styles.pendingThumb}
|
||||||
|
/>
|
||||||
|
) : (
|
||||||
|
<View style={[styles.pendingThumb, {justifyContent: 'center', alignItems: 'center'}]}>
|
||||||
|
<Text style={{fontSize: 20}}>{'\uD83D\uDCC4'}</Text>
|
||||||
|
</View>
|
||||||
|
)}
|
||||||
|
<TouchableOpacity
|
||||||
|
style={styles.pendingRemove}
|
||||||
|
onPress={() => setPendingAttachments(prev => prev.filter((_, i) => i !== idx))}
|
||||||
|
>
|
||||||
|
<Text style={{color: '#fff', fontSize: 10, fontWeight: 'bold'}}>X</Text>
|
||||||
|
</TouchableOpacity>
|
||||||
|
</View>
|
||||||
|
))}
|
||||||
|
</ScrollView>
|
||||||
|
<Text style={{color: '#8888AA', fontSize: 11, marginLeft: 8}}>{pendingAttachments.length}</Text>
|
||||||
|
<TouchableOpacity onPress={() => setPendingAttachments([])}>
|
||||||
|
<Text style={{color: '#FF3B30', fontSize: 14, paddingHorizontal: 8}}>Alle X</Text>
|
||||||
|
</TouchableOpacity>
|
||||||
|
</View>
|
||||||
|
)}
|
||||||
|
|
||||||
{/* Eingabebereich */}
|
{/* Eingabebereich */}
|
||||||
<View style={styles.inputContainer}>
|
<View style={styles.inputContainer}>
|
||||||
{/* Datei-Buttons */}
|
{/* Datei-Buttons */}
|
||||||
@@ -692,7 +730,7 @@ const ChatScreen: React.FC = () => {
|
|||||||
style={styles.textInput}
|
style={styles.textInput}
|
||||||
value={inputText}
|
value={inputText}
|
||||||
onChangeText={setInputText}
|
onChangeText={setInputText}
|
||||||
placeholder="Nachricht an ARIA..."
|
placeholder={pendingAttachments.length > 0 ? "Text zu den Anhaengen (optional)..." : "Nachricht an ARIA..."}
|
||||||
placeholderTextColor="#555570"
|
placeholderTextColor="#555570"
|
||||||
multiline
|
multiline
|
||||||
maxLength={4000}
|
maxLength={4000}
|
||||||
@@ -701,7 +739,7 @@ const ChatScreen: React.FC = () => {
|
|||||||
/>
|
/>
|
||||||
|
|
||||||
{/* Senden oder Sprache */}
|
{/* Senden oder Sprache */}
|
||||||
{inputText.trim() ? (
|
{inputText.trim() || pendingAttachments.length > 0 ? (
|
||||||
<TouchableOpacity style={styles.sendButton} onPress={sendTextMessage}>
|
<TouchableOpacity style={styles.sendButton} onPress={sendTextMessage}>
|
||||||
<Text style={styles.sendIcon}>{'\u2B06\uFE0F'}</Text>
|
<Text style={styles.sendIcon}>{'\u2B06\uFE0F'}</Text>
|
||||||
</TouchableOpacity>
|
</TouchableOpacity>
|
||||||
@@ -932,6 +970,36 @@ const styles = StyleSheet.create({
|
|||||||
wakeWordIcon: {
|
wakeWordIcon: {
|
||||||
fontSize: 16,
|
fontSize: 16,
|
||||||
},
|
},
|
||||||
|
pendingBar: {
|
||||||
|
flexDirection: 'row',
|
||||||
|
alignItems: 'center',
|
||||||
|
backgroundColor: '#1E1E2E',
|
||||||
|
paddingHorizontal: 12,
|
||||||
|
paddingVertical: 8,
|
||||||
|
borderTopWidth: 1,
|
||||||
|
borderTopColor: '#2A2A3E',
|
||||||
|
},
|
||||||
|
pendingItem: {
|
||||||
|
position: 'relative',
|
||||||
|
marginRight: 8,
|
||||||
|
},
|
||||||
|
pendingThumb: {
|
||||||
|
width: 50,
|
||||||
|
height: 50,
|
||||||
|
borderRadius: 6,
|
||||||
|
backgroundColor: '#0D0D1A',
|
||||||
|
},
|
||||||
|
pendingRemove: {
|
||||||
|
position: 'absolute',
|
||||||
|
top: -4,
|
||||||
|
right: -4,
|
||||||
|
width: 18,
|
||||||
|
height: 18,
|
||||||
|
borderRadius: 9,
|
||||||
|
backgroundColor: '#FF3B30',
|
||||||
|
justifyContent: 'center',
|
||||||
|
alignItems: 'center',
|
||||||
|
},
|
||||||
searchBar: {
|
searchBar: {
|
||||||
flexDirection: 'row',
|
flexDirection: 'row',
|
||||||
alignItems: 'center',
|
alignItems: 'center',
|
||||||
|
|||||||
@@ -214,10 +214,22 @@ class AudioService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Callback wenn alle Audio-Teile abgespielt sind
|
||||||
|
private playbackFinishedListeners: (() => void)[] = [];
|
||||||
|
|
||||||
|
onPlaybackFinished(callback: () => void): () => void {
|
||||||
|
this.playbackFinishedListeners.push(callback);
|
||||||
|
return () => {
|
||||||
|
this.playbackFinishedListeners = this.playbackFinishedListeners.filter(cb => cb !== callback);
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
/** Naechstes Audio aus der Queue abspielen */
|
/** Naechstes Audio aus der Queue abspielen */
|
||||||
private async _playNext(): Promise<void> {
|
private async _playNext(): Promise<void> {
|
||||||
if (this.audioQueue.length === 0) {
|
if (this.audioQueue.length === 0) {
|
||||||
this.isPlaying = false;
|
this.isPlaying = false;
|
||||||
|
// Alle Audio-Teile abgespielt → Listener benachrichtigen
|
||||||
|
this.playbackFinishedListeners.forEach(cb => cb());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,10 +1,11 @@
|
|||||||
/**
|
/**
|
||||||
* Wake Word Service — "ARIA" Erkennung
|
* Gespraechsmodus — "Ohr-Button"
|
||||||
*
|
*
|
||||||
* Phase 1: Deaktiviert — react-native-live-audio-stream hat native Bridge-Probleme.
|
* Wenn aktiv: Nach jeder ARIA-Antwort (TTS fertig) startet automatisch die Aufnahme.
|
||||||
* Nutzt stattdessen Tap-to-Talk (VoiceButton) als primaeren Eingabemodus.
|
* Wie ein Walkie-Talkie / natuerliches Gespraech:
|
||||||
|
* ARIA spricht → Aufnahme startet → User spricht → VAD stoppt → ARIA antwortet → ...
|
||||||
*
|
*
|
||||||
* Phase 2: Porcupine on-device "ARIA" Keyword (geplant).
|
* Phase 2 (geplant): Porcupine "ARIA" Wake Word fuer passives Lauschen.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
type WakeWordCallback = () => void;
|
type WakeWordCallback = () => void;
|
||||||
@@ -17,30 +18,39 @@ class WakeWordService {
|
|||||||
private wakeCallbacks: WakeWordCallback[] = [];
|
private wakeCallbacks: WakeWordCallback[] = [];
|
||||||
private stateCallbacks: StateCallback[] = [];
|
private stateCallbacks: StateCallback[] = [];
|
||||||
|
|
||||||
/** Wake Word Erkennung starten */
|
/** Gespraechsmodus starten */
|
||||||
async start(): Promise<boolean> {
|
async start(): Promise<boolean> {
|
||||||
if (this.state === 'listening') return true;
|
if (this.state === 'listening') return true;
|
||||||
|
console.log('[WakeWord] Gespraechsmodus aktiviert — starte sofort Aufnahme');
|
||||||
try {
|
this.setState('listening');
|
||||||
// Phase 1: LiveAudioStream deaktiviert (native Bridge instabil)
|
// Sofort erste Aufnahme starten
|
||||||
// Stattdessen: Tap-to-Talk als primaerer Modus
|
setTimeout(() => {
|
||||||
console.log('[WakeWord] Wake Word ist in Phase 1 noch nicht verfuegbar — nutze Tap-to-Talk');
|
if (this.state === 'listening') {
|
||||||
this.setState('listening');
|
this.wakeCallbacks.forEach(cb => cb());
|
||||||
return true;
|
}
|
||||||
} catch (err) {
|
}, 500);
|
||||||
console.error('[WakeWord] Start fehlgeschlagen:', err);
|
return true;
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Wake Word Erkennung stoppen */
|
/** Gespraechsmodus stoppen */
|
||||||
stop(): void {
|
stop(): void {
|
||||||
|
console.log('[WakeWord] Gespraechsmodus deaktiviert');
|
||||||
this.setState('off');
|
this.setState('off');
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Nach Aufnahme erneut starten */
|
/** Nach ARIA-Antwort (TTS fertig): Aufnahme automatisch starten */
|
||||||
async resume(): Promise<void> {
|
async resume(): Promise<void> {
|
||||||
// Nichts zu tun in Phase 1
|
if (this.state !== 'listening') return;
|
||||||
|
// Kurze Pause damit TTS-Audio nicht ins Mikrofon geht
|
||||||
|
await new Promise(resolve => setTimeout(resolve, 800));
|
||||||
|
if (this.state === 'listening') {
|
||||||
|
console.log('[WakeWord] TTS fertig — starte automatisch Aufnahme');
|
||||||
|
this.wakeCallbacks.forEach(cb => cb());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
isActive(): boolean {
|
||||||
|
return this.state === 'listening';
|
||||||
}
|
}
|
||||||
|
|
||||||
// --- Callbacks ---
|
// --- Callbacks ---
|
||||||
|
|||||||
+16
-4
@@ -201,11 +201,23 @@ class VoiceEngine:
|
|||||||
return None
|
return None
|
||||||
|
|
||||||
try:
|
try:
|
||||||
# Langen Text in Saetze aufteilen (Piper hat Limits bei langen Texten)
|
# Markdown + Sonderzeichen entfernen fuer natuerliche Sprache
|
||||||
import re
|
import re
|
||||||
sentences = re.split(r'(?<=[.!?])\s+', text.strip())
|
clean = text.strip()
|
||||||
# Markdown-Formatierung entfernen
|
clean = re.sub(r'\*\*([^*]+)\*\*', r'\1', clean) # **fett**
|
||||||
sentences = [re.sub(r'\*\*([^*]+)\*\*', r'\1', s).strip() for s in sentences if s.strip()]
|
clean = re.sub(r'\*([^*]+)\*', r'\1', clean) # *kursiv*
|
||||||
|
clean = re.sub(r'`[^`]+`', '', clean) # `code`
|
||||||
|
clean = re.sub(r'```[\s\S]*?```', '', clean) # Code-Bloecke
|
||||||
|
clean = re.sub(r'\[([^\]]+)\]\([^)]+\)', r'\1', clean) # [text](url)
|
||||||
|
clean = re.sub(r'#{1,6}\s*', '', clean) # ### Ueberschriften
|
||||||
|
clean = re.sub(r'>\s*', '', clean) # > Zitate
|
||||||
|
clean = re.sub(r'[-*]\s+', '', clean) # Listen
|
||||||
|
clean = re.sub(r'\n{2,}', '. ', clean) # Absaetze
|
||||||
|
clean = re.sub(r'\n', ', ', clean) # Zeilenumbrueche
|
||||||
|
clean = re.sub(r'\s{2,}', ' ', clean) # Mehrfach-Leerzeichen
|
||||||
|
clean = re.sub(r'["""„]', '', clean) # Anfuehrungszeichen
|
||||||
|
sentences = re.split(r'(?<=[.!?])\s+', clean)
|
||||||
|
sentences = [s.strip() for s in sentences if s.strip()]
|
||||||
|
|
||||||
if not sentences:
|
if not sentences:
|
||||||
return None
|
return None
|
||||||
|
|||||||
+81
-7
@@ -205,8 +205,14 @@
|
|||||||
<span><span style="animation:pulse 1s infinite;">💭</span> <span id="thinking-text">ARIA denkt...</span></span>
|
<span><span style="animation:pulse 1s infinite;">💭</span> <span id="thinking-text">ARIA denkt...</span></span>
|
||||||
<button class="btn secondary" onclick="cancelRequest()" style="padding:2px 10px;font-size:11px;color:#FF3B30;border-color:#FF3B30;">Abbrechen</button>
|
<button class="btn secondary" onclick="cancelRequest()" style="padding:2px 10px;font-size:11px;color:#FF3B30;border-color:#FF3B30;">Abbrechen</button>
|
||||||
</div>
|
</div>
|
||||||
|
<div id="diag-pending-attachments" style="display:none;padding:6px 10px;background:#1E1E2E;border-radius:6px 6px 0 0;margin-bottom:-4px;display:flex;gap:6px;flex-wrap:wrap;align-items:center;">
|
||||||
|
</div>
|
||||||
<div class="input-row">
|
<div class="input-row">
|
||||||
<input type="text" id="chat-input" placeholder="Nachricht an ARIA...">
|
<label class="btn secondary" style="padding:6px 10px;cursor:pointer;font-size:14px;" title="Datei anhaengen">
|
||||||
|
📎
|
||||||
|
<input type="file" id="diag-file-input" multiple accept="image/*,application/pdf,.doc,.docx,.txt" style="display:none;" onchange="handleDiagFileSelect(this.files)">
|
||||||
|
</label>
|
||||||
|
<input type="text" id="chat-input" placeholder="Nachricht an ARIA..." onpaste="handleDiagPaste(event)">
|
||||||
<button class="btn" id="btn-gw" onclick="testGateway()">Gateway senden</button>
|
<button class="btn" id="btn-gw" onclick="testGateway()">Gateway senden</button>
|
||||||
<button class="btn" id="btn-rvs" onclick="testRVS()">Via RVS senden</button>
|
<button class="btn" id="btn-rvs" onclick="testRVS()">Via RVS senden</button>
|
||||||
</div>
|
</div>
|
||||||
@@ -939,21 +945,39 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function sendDiagAttachments() {
|
||||||
|
// Alle pending Dateien an RVS senden
|
||||||
|
for (const f of diagPendingFiles) {
|
||||||
|
send({ action: 'send_file', name: f.name, type: f.type, size: f.size, base64: f.base64 });
|
||||||
|
}
|
||||||
|
if (diagPendingFiles.length > 0) {
|
||||||
|
addChat('sent', `${diagPendingFiles.length} Anhang/Anhaenge`, 'Datei');
|
||||||
|
}
|
||||||
|
diagPendingFiles = [];
|
||||||
|
renderDiagPending();
|
||||||
|
}
|
||||||
|
|
||||||
function testGateway() {
|
function testGateway() {
|
||||||
const input = document.getElementById('chat-input');
|
const input = document.getElementById('chat-input');
|
||||||
const text = input.value.trim();
|
const text = input.value.trim();
|
||||||
if (!text) return;
|
if (!text && diagPendingFiles.length === 0) return;
|
||||||
addChat('sent', text, 'Gateway direkt');
|
if (diagPendingFiles.length > 0) sendDiagAttachments();
|
||||||
send({ action: 'test_gateway', text });
|
if (text) {
|
||||||
|
addChat('sent', text, 'Gateway direkt');
|
||||||
|
send({ action: 'test_gateway', text });
|
||||||
|
}
|
||||||
input.value = '';
|
input.value = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
function testRVS() {
|
function testRVS() {
|
||||||
const input = document.getElementById('chat-input');
|
const input = document.getElementById('chat-input');
|
||||||
const text = input.value.trim();
|
const text = input.value.trim();
|
||||||
if (!text) return;
|
if (!text && diagPendingFiles.length === 0) return;
|
||||||
addChat('sent', text, 'via RVS');
|
if (diagPendingFiles.length > 0) sendDiagAttachments();
|
||||||
send({ action: 'test_rvs', text });
|
if (text) {
|
||||||
|
addChat('sent', text, 'via RVS');
|
||||||
|
send({ action: 'test_rvs', text });
|
||||||
|
}
|
||||||
input.value = '';
|
input.value = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1302,6 +1326,56 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ── Diagnostic Anhang-Handling ─────────────
|
||||||
|
let diagPendingFiles = [];
|
||||||
|
|
||||||
|
function handleDiagFileSelect(files) {
|
||||||
|
for (const file of files) {
|
||||||
|
const reader = new FileReader();
|
||||||
|
reader.onload = () => {
|
||||||
|
const base64 = reader.result.split(',')[1];
|
||||||
|
diagPendingFiles.push({ name: file.name, type: file.type, size: file.size, base64 });
|
||||||
|
renderDiagPending();
|
||||||
|
};
|
||||||
|
reader.readAsDataURL(file);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function handleDiagPaste(event) {
|
||||||
|
const items = event.clipboardData?.items;
|
||||||
|
if (!items) return;
|
||||||
|
for (const item of items) {
|
||||||
|
if (item.kind === 'file') {
|
||||||
|
event.preventDefault();
|
||||||
|
const file = item.getAsFile();
|
||||||
|
if (file) handleDiagFileSelect([file]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function renderDiagPending() {
|
||||||
|
const container = document.getElementById('diag-pending-attachments');
|
||||||
|
if (diagPendingFiles.length === 0) {
|
||||||
|
container.style.display = 'none';
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
container.style.display = 'flex';
|
||||||
|
container.innerHTML = diagPendingFiles.map((f, i) => {
|
||||||
|
const isImage = f.type.startsWith('image/');
|
||||||
|
const preview = isImage ? `<img src="data:${f.type};base64,${f.base64}" style="width:40px;height:40px;border-radius:4px;object-fit:cover;">` : `<span style="font-size:20px;">📄</span>`;
|
||||||
|
return `<div style="position:relative;display:inline-block;">
|
||||||
|
${preview}
|
||||||
|
<span onclick="removeDiagPending(${i})" style="position:absolute;top:-4px;right:-4px;width:16px;height:16px;border-radius:8px;background:#FF3B30;color:#fff;font-size:10px;cursor:pointer;display:flex;align-items:center;justify-content:center;">X</span>
|
||||||
|
</div>`;
|
||||||
|
}).join('') + `<span style="color:#8888AA;font-size:11px;margin-left:4px;">${diagPendingFiles.length} Datei(en)</span>
|
||||||
|
<span onclick="diagPendingFiles=[];renderDiagPending();" style="color:#FF3B30;font-size:11px;cursor:pointer;margin-left:8px;">Alle X</span>`;
|
||||||
|
}
|
||||||
|
|
||||||
|
function removeDiagPending(idx) {
|
||||||
|
diagPendingFiles.splice(idx, 1);
|
||||||
|
renderDiagPending();
|
||||||
|
}
|
||||||
|
|
||||||
// ── Abbrechen ──────────────────────────────
|
// ── Abbrechen ──────────────────────────────
|
||||||
function cancelRequest() {
|
function cancelRequest() {
|
||||||
send({ action: 'cancel_request' });
|
send({ action: 'cancel_request' });
|
||||||
|
|||||||
@@ -1181,6 +1181,14 @@ wss.on("connection", (ws) => {
|
|||||||
if (ws._sshSock) ws._sshSock.write(msg.data);
|
if (ws._sshSock) ws._sshSock.write(msg.data);
|
||||||
} else if (msg.action === "live_ssh_close") {
|
} else if (msg.action === "live_ssh_close") {
|
||||||
if (ws._sshSock) { ws._sshSock.end(); ws._sshSock = null; }
|
if (ws._sshSock) { ws._sshSock.end(); ws._sshSock = null; }
|
||||||
|
} else if (msg.action === "send_file") {
|
||||||
|
// Datei von Diagnostic an Bridge via RVS senden
|
||||||
|
sendToRVS_raw({
|
||||||
|
type: "file",
|
||||||
|
payload: { name: msg.name, type: msg.type, size: msg.size, base64: msg.base64 },
|
||||||
|
timestamp: Date.now(),
|
||||||
|
});
|
||||||
|
log("info", "server", `Datei gesendet: ${msg.name} (${msg.type})`);
|
||||||
} else if (msg.action === "cancel_request") {
|
} else if (msg.action === "cancel_request") {
|
||||||
// Laufende Anfrage abbrechen — doctor --fix beendet stuck runs
|
// Laufende Anfrage abbrechen — doctor --fix beendet stuck runs
|
||||||
log("warn", "server", "Anfrage abgebrochen — fuehre doctor --fix aus");
|
log("warn", "server", "Anfrage abgebrochen — fuehre doctor --fix aus");
|
||||||
|
|||||||
@@ -6,9 +6,9 @@
|
|||||||
- [x] Sprachnachrichten werden als Text angezeigt (STT → Chat-Bubble)
|
- [x] Sprachnachrichten werden als Text angezeigt (STT → Chat-Bubble)
|
||||||
- [x] Cache leeren + Auto-Download von Anhaengen
|
- [x] Cache leeren + Auto-Download von Anhaengen
|
||||||
- [x] ARIA liest Nachrichten vor (TTS via Piper)
|
- [x] ARIA liest Nachrichten vor (TTS via Piper)
|
||||||
- [x] Autoscroll zur letzten Nachricht
|
- [x] Autoscroll zur letzten Nachricht (inverted FlatList)
|
||||||
- [x] Bilder im Chat groesser + Vollbild-Vorschau
|
- [x] Bilder im Chat groesser + Vollbild-Vorschau
|
||||||
- [x] Ohr-Button Absturz gefixt (LiveAudioStream entfernt, Phase 1 Placeholder)
|
- [x] Ohr-Button → Gespraechsmodus (Auto-Aufnahme nach ARIA-Antwort)
|
||||||
- [x] Play-Button in ARIA-Nachrichten fuer Sprachwiedergabe
|
- [x] Play-Button in ARIA-Nachrichten fuer Sprachwiedergabe
|
||||||
- [x] Chat-Suche in der App (Lupe in Statusleiste)
|
- [x] Chat-Suche in der App (Lupe in Statusleiste)
|
||||||
- [x] Watchdog mit Container-Restart (2min Warnung → 5min doctor --fix → 8min Restart)
|
- [x] Watchdog mit Container-Restart (2min Warnung → 5min doctor --fix → 8min Restart)
|
||||||
@@ -22,27 +22,28 @@
|
|||||||
- [x] XTTS Voice Cloning (Audio-Samples hochladen, eigene Stimme)
|
- [x] XTTS Voice Cloning (Audio-Samples hochladen, eigene Stimme)
|
||||||
- [x] TTS Engine waehlbar (Piper/XTTS) in Diagnostic + App
|
- [x] TTS Engine waehlbar (Piper/XTTS) in Diagnostic + App
|
||||||
- [x] Auto-Update System (APK via RVS WebSocket)
|
- [x] Auto-Update System (APK via RVS WebSocket)
|
||||||
|
- [x] Auto-Update: APK-Installation via FileProvider
|
||||||
|
- [x] Auto-Update: "Auf Updates pruefen" Button in App-Einstellungen
|
||||||
- [x] Audio-Queue (sequentielle Wiedergabe, kein Ueberlappen)
|
- [x] Audio-Queue (sequentielle Wiedergabe, kein Ueberlappen)
|
||||||
|
- [x] Textnachrichten werden von ARIA beantwortet (Bridge chat handler fix)
|
||||||
|
- [x] Mehrere Anhaenge + Text vor dem Senden (Pending-Vorschau)
|
||||||
|
- [x] Paste-Support fuer Bilder in Diagnostic Chat
|
||||||
|
- [x] Markdown-Bereinigung fuer TTS (fett, kursiv, code, links, etc.)
|
||||||
|
- [x] SSH Volume read-write fuer Proxy (kein -F Workaround mehr)
|
||||||
|
|
||||||
## Offen
|
## Offen
|
||||||
|
|
||||||
### Bugs (Prioritaet)
|
### Bugs (Prioritaet)
|
||||||
- [ ] Session-Persistenz: Bei Container-Restart wird immer aria-bridge geladen statt die zuletzt gewaehlte Session. Wird nicht persistent gespeichert.
|
- [ ] Session-Persistenz: Bei Container-Restart wird immer aria-bridge geladen statt die zuletzt gewaehlte Session
|
||||||
- [ ] App: Textnachrichten, Bilder und Anhaenge werden von ARIA nicht beantwortet — nur Sprachnachrichten funktionieren.
|
|
||||||
- [ ] App: Audioausgabe hoert ab und zu einfach auf (mitten im Satz oder zwischen Chunks)
|
- [ ] App: Audioausgabe hoert ab und zu einfach auf (mitten im Satz oder zwischen Chunks)
|
||||||
- [ ] Auto-Update: APK-Installation schlaegt fehl (file:// URI exposed beyond app — braucht FileProvider fuer content:// URI)
|
|
||||||
- [ ] Auto-Update: "Auf Updates pruefen" Button in App-Einstellungen
|
|
||||||
- [ ] App: Kein Auto-Scroll zur letzten Nachricht beim App-Start (soll direkt springen, nicht animiert scrollen)
|
|
||||||
- [ ] App: Bei neuen Nachrichten soll automatisch zur letzten Nachricht gescrollt werden
|
|
||||||
|
|
||||||
### App Features
|
### App Features
|
||||||
- [ ] App: Zu Anhaengen noch Text/Sprache hinzufuegen koennen (z.B. Bild senden + "Was siehst du?")
|
- [ ] Wake Word on-device (Porcupine "ARIA" Keyword, Phase 2 — passives Lauschen)
|
||||||
- [ ] Wake Word on-device (Porcupine "ARIA" Keyword, Phase 2)
|
|
||||||
- [ ] Chat-History zuverlaessiger laden (AsyncStorage Race Condition)
|
- [ ] Chat-History zuverlaessiger laden (AsyncStorage Race Condition)
|
||||||
- [ ] Background Audio Service (TTS auch bei minimierter App)
|
- [ ] Background Audio Service (TTS auch bei minimierter App)
|
||||||
|
|
||||||
### TTS / Audio
|
### TTS / Audio
|
||||||
- [ ] XTTS Audio-Streaming verbessern (minimales Stottern bei Chunk-Uebergaengen)
|
- [ ] XTTS Audio-Streaming (PCM-Stream statt WAV-Dateien, eliminiert Stottern komplett)
|
||||||
- [ ] Audio-Normalisierung (Lautstaerke zwischen Chunks angleichen)
|
- [ ] Audio-Normalisierung (Lautstaerke zwischen Chunks angleichen)
|
||||||
- [ ] Piper Voices Download ueber Diagnostic (neue Sprachen/Stimmen)
|
- [ ] Piper Voices Download ueber Diagnostic (neue Sprachen/Stimmen)
|
||||||
|
|
||||||
@@ -50,4 +51,4 @@
|
|||||||
- [ ] Bilder: Claude Vision direkt nutzen (aktuell nur Dateipfad an ARIA)
|
- [ ] Bilder: Claude Vision direkt nutzen (aktuell nur Dateipfad an ARIA)
|
||||||
- [ ] Auto-Compacting und Memory/Brain Verwaltung (SQLite?)
|
- [ ] Auto-Compacting und Memory/Brain Verwaltung (SQLite?)
|
||||||
- [ ] Diagnostic: System-Info Tab (Container-Status, Disk, RAM, CPU)
|
- [ ] Diagnostic: System-Info Tab (Container-Status, Disk, RAM, CPU)
|
||||||
- [ ] RVS Zombie-Connections endgueltig loesen (WebRTC statt WebSocket?)
|
- [ ] RVS Zombie-Connections endgueltig loesen
|
||||||
|
|||||||
+16
-2
@@ -97,8 +97,22 @@ async function handleTTSRequest(payload) {
|
|||||||
const { text, voice, requestId, language } = payload;
|
const { text, voice, requestId, language } = payload;
|
||||||
if (!text) return;
|
if (!text) return;
|
||||||
|
|
||||||
// Markdown entfernen
|
// Markdown + Sonderzeichen entfernen fuer natuerliche Sprache
|
||||||
const cleanText = text.replace(/\*\*([^*]+)\*\*/g, "$1").trim();
|
let cleanText = text
|
||||||
|
.replace(/\*\*([^*]+)\*\*/g, "$1") // **fett** → fett
|
||||||
|
.replace(/\*([^*]+)\*/g, "$1") // *kursiv* → kursiv
|
||||||
|
.replace(/`([^`]+)`/g, "$1") // `code` → code
|
||||||
|
.replace(/```[\s\S]*?```/g, "") // Code-Bloecke entfernen
|
||||||
|
.replace(/\[([^\]]+)\]\([^)]+\)/g, "$1") // [text](url) → text
|
||||||
|
.replace(/#{1,6}\s*/g, "") // ### Ueberschriften → entfernen
|
||||||
|
.replace(/>\s*/g, "") // > Zitate → entfernen
|
||||||
|
.replace(/[-*]\s+/g, "") // - Listen → entfernen
|
||||||
|
.replace(/\n{2,}/g, ". ") // Mehrere Newlines → Punkt
|
||||||
|
.replace(/\n/g, ", ") // Einzelne Newlines → Komma
|
||||||
|
.replace(/\s{2,}/g, " ") // Mehrfach-Leerzeichen
|
||||||
|
.replace(/["""„]/g, "") // Anfuehrungszeichen entfernen
|
||||||
|
.replace(/\(\)/g, "") // Leere Klammern
|
||||||
|
.trim();
|
||||||
|
|
||||||
// Text in Saetze aufteilen, dann zu Chunks von 2-3 Saetzen zusammenfassen
|
// Text in Saetze aufteilen, dann zu Chunks von 2-3 Saetzen zusammenfassen
|
||||||
// (mehr Kontext = konsistentere Stimme/Lautstaerke, aber nicht zu lang fuer WebSocket)
|
// (mehr Kontext = konsistentere Stimme/Lautstaerke, aber nicht zu lang fuer WebSocket)
|
||||||
|
|||||||
Reference in New Issue
Block a user