Optimize APK size

Removes unused keyword-spotting model. Makes on-device voice model a
runtime download rather than bundling it. Removes native-code library
versions for 32-bit and x86_64 processors.
This commit is contained in:
James Babcock committed 2026-08-22 23:04:01 -07:00
1 parent 69ec828cb7
commit 2b71eddab5
27 files changed
+313 -1283

No files matched your search

-24
View File
@@ -195,7 +195,6 @@ class DashboardController {
private offFrameMetrics: (() => void) | null = null;
private offFirmwareInfo: (() => void) | null = null;
private offVoiceStatus: (() => void) | null = null;
private offVoiceWakeWord: (() => void) | null = null;
private offAndroidNotification: (() => void) | null = null;
private lastInput = "waiting...";
private lastSys = "none yet";
@@ -1011,11 +1010,6 @@ class DashboardController {
this.offVoiceStatus = voiceControlBridge.onStatus((state) => {
this.appendLog(state.status);
});
this.offVoiceWakeWord = voiceControlBridge.onWakeWord((keyword) => {
void this.handleWakeWord(keyword).catch((error) => {
this.appendLog(`wake-word handler failed: ${this.formatError(error)}`);
});
});
await mediaControllerBridge.start();
await nightscoutBridge.start();
@@ -1082,8 +1076,6 @@ class DashboardController {
this.offFirmwareInfo = null;
this.offVoiceStatus?.();
this.offVoiceStatus = null;
this.offVoiceWakeWord?.();
this.offVoiceWakeWord = null;
await mediaControllerBridge.stop().catch(() => {});
await nightscoutBridge.stop().catch(() => {});
voiceControlBridge.stop();
@@ -1182,8 +1174,6 @@ class DashboardController {
this.offFirmwareInfo = null;
this.offVoiceStatus?.();
this.offVoiceStatus = null;
this.offVoiceWakeWord?.();
this.offVoiceWakeWord = null;
const communicator = this.communicator;
this.communicator = null;
@@ -1816,20 +1806,6 @@ class DashboardController {
this.updateCompositePreview();
}
private async handleWakeWord(keyword: string): Promise<void> {
const normalized = keyword.trim();
if (normalized.length === 0) return;
this.appendLog(`wake-word detected: ${normalized}`);
const woke = shell.wake("sidebar");
if (woke) {
const ready = await this.ensureEvenHubSessionActive();
if (!ready) {
this.appendLog("EvenHub wake barrier timed out for phone wakeword");
}
this.requestShellRender();
}
}
private async handleAndroidNotificationPosted(notificationKey: string): Promise<void> {
if (!notificationKey) {
this.requestShellRender();