feat(voice): background local model downloads with runtime gating

This commit is contained in:
Mohamed Boudra
2026-02-13 23:23:28 +07:00
parent c41815dcb7
commit cfd061a86d
14 changed files with 874 additions and 392 deletions
@@ -10,6 +10,7 @@ import {
Image,
Platform,
BackHandler,
Alert,
} from "react-native";
import {
useState,
@@ -297,6 +298,8 @@ export const MessageInput = forwardRef<MessageInputRef, MessageInputProps>(
}
void voice.startVoice(voiceServerId, voiceAgentId).catch((error) => {
console.error("[MessageInput] Failed to start realtime voice", error);
const message = error instanceof Error ? error.message : "Voice features are not available right now.";
Alert.alert("Voice unavailable", message);
});
};
@@ -461,6 +464,8 @@ export const MessageInput = forwardRef<MessageInputRef, MessageInputProps>(
}
void voice.startVoice(voiceServerId, voiceAgentId).catch((error) => {
console.error("[MessageInput] Failed to start realtime voice", error);
const message = error instanceof Error ? error.message : "Voice features are not available right now.";
Alert.alert("Voice unavailable", message);
});
}, [
disabled,