Add microphone support on RayNeo iO

This commit is contained in:
James Babcock committed 2026-11-01 21:08:25 -08:00
1 parent fde847a31a
commit 9ddd4c4d03
13 files changed
+407 -5

No files matched your search

+21
View File
@@ -468,6 +468,7 @@ class DashboardController {
this.pushFirmwareDebugFlags();
this.pushBrightness();
this.syncEvenHubScreenOffSetting();
this.syncVoiceWake();
// Display mode size first: a reflow repositions every surface too, so
// the band-position check after it then has nothing left to do.
this.applyDisplayModeIfChanged();
@@ -930,6 +931,24 @@ class DashboardController {
return applied;
}
/** What the communicator was last told about the glasses' own wake word (null: not yet). */
private voiceWakeSent: boolean | null = null;
/**
* The glasses' own wake word follows the wake action: on a RayNeo iO, its
* "Hey RayNeo" switch (G2 glasses use the wake lease, syncFaceclawWakeLease).
*/
private syncVoiceWake(communicator = this.communicator): void {
if (!communicator) return;
const enabled = wakeWordActionSetting.get() !== "off";
if (this.voiceWakeSent === enabled) return;
this.voiceWakeSent = enabled;
void communicator.setVoiceWakeEnabled(enabled).catch((error) => {
this.voiceWakeSent = null;
this.appendLog(`wake word sync failed: ${this.formatError(error)}`);
});
}
private syncEvenHubScreenOffSetting(): void {
void this.syncFaceclawWakeLease().catch((error) => {
this.appendLog(`wake takeover lease sync failed: ${this.formatError(error)}`);
@@ -1537,6 +1556,8 @@ class DashboardController {
// The paired glasses' screen: the G2's 640x480 or the RayNeo iO's 540x220.
await communicator.configureCompositorScreen(screenWidth(), screenHeight());
await communicator.configureBrightness(getBrightnessPreferences());
this.voiceWakeSent = null;
this.syncVoiceWake(communicator);
this.offState = communicator.onStateChange((state) => {
if (state.phase !== "connected") resetRingInputFilter();
if (isHaltedSessionPhase(state.phase)) {
+3
View File
@@ -679,6 +679,9 @@ export class FaceclawCommunicatorBridge {
return this.enqueueNativeCall(() => Boolean(this.communicator.setFaceclawWakeLeaseEnabledEnabled(Boolean(enabled))));
}
/** The RayNeo iO's wake word; iOS doesn't drive an iO, so nothing to do. */
async setVoiceWakeEnabled(_enabled: boolean): Promise<void> {}
async awaitEvenHubSessionReady(timeoutMs: number): Promise<boolean> {
return this.enqueueNativeCall(() => Boolean(this.communicator.awaitEvenHubSessionReadyTimeoutMs(Math.round(nonNegativeNumber(timeoutMs)))));
}
+8
View File
@@ -734,6 +734,14 @@ export class FaceclawCommunicatorBridge {
);
}
/**
* Whether the glasses' own wake word reaches Faceclaw: on a RayNeo iO, its
* "Hey RayNeo" switch (G2 glasses use the wake lease above instead).
*/
async setVoiceWakeEnabled(enabled: boolean): Promise<void> {
await this.enqueueJavaCall(() => this.communicator.setVoiceWakeEnabled(enabled));
}
/**
* Resolve only once the recreated layout and retained frame
* are visible. CFW's deferred-dashboard READY is emitted from this barrier.