Skip to content

Prefer realtime voice in Capacitor shell#569

Merged
rogerchappel merged 1 commit into
mainfrom
codex/capacitor-realtime-voice
May 21, 2026
Merged

Prefer realtime voice in Capacitor shell#569
rogerchappel merged 1 commit into
mainfrom
codex/capacitor-realtime-voice

Conversation

@rogerchappel
Copy link
Copy Markdown
Owner

Summary

  • Attempts realtime gateway-relay voice before starting the native voice plugin path
  • Keeps native voice as fallback when realtime is disabled or realtime startup fails
  • Adds native availability details to the realtime activation diagnostic event

Why

The web app was entering realtime correctly, but the Capacitor app started the native voice session first and returned from activate.native-only. That meant NEXT_PUBLIC_CREWCMD_REALTIME_VOICE=1 never reached /talk/realtime/session in the native shell.

Local verification

  • pnpm test -- src/lib/gateway-client-realtime.test.ts src/lib/realtime-voice-client.test.ts src/lib/runtime-capabilities.test.ts
  • pnpm typecheck
  • git diff --check origin/main..HEAD
  • pre-push: pnpm typecheck && pnpm build

Manual test notes

In the Capacitor app with NEXT_PUBLIC_CREWCMD_REALTIME_VOICE=1, activating voice should now log:

  • POST /api/runtimes/<id>/talk/realtime/session 200
  • relay frames to /talk/realtime/relay

It should not immediately take /api/mobile/voice-session/token unless realtime startup fails or realtime is disabled.

@rogerchappel rogerchappel merged commit 780b9c9 into main May 21, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant