Skip to content

fix: stabilize and harden voice sessions - #1692

Open
Scoteezy wants to merge 1 commit into
slopus:mainfrom
Scoteezy:fix/stabilize-voice-sessions
Open

fix: stabilize and harden voice sessions#1692
Scoteezy wants to merge 1 commit into
slopus:mainfrom
Scoteezy:fix/stabilize-voice-sessions

Conversation

@Scoteezy

Copy link
Copy Markdown
Contributor

Summary

  • upgrade the ElevenLabs React and React Native SDKs together with the compatible LiveKit/WebRTC stack
  • replace the shared mutable conversation wrapper with a lifecycle adapter that serializes start/stop, waits for disconnect, and resets the provider before reuse
  • remove the obsolete audio API integration and LiveKit/audio patches
  • harden server token parsing, external request failures, RevenueCat entitlement windows, and paginated ElevenLabs usage accounting
  • add regression coverage for repeated sessions, teardown races, token parsing, quota boundaries, caching, and lifetime entitlements
  • update voice quota and deployment documentation

Validation

  • pnpm --dir packages/happy-app test --run sources/realtime/RealtimeSession.test.ts sources/realtime/RealtimeVoiceSessionAdapter.test.ts — 10 passed
  • pnpm --dir packages/happy-server test --run sources/app/api/routes/voiceRoutes.test.ts sources/app/api/routes/voiceToken.test.ts — 26 passed
  • pnpm --dir packages/happy-app typecheck
  • pnpm --dir packages/happy-server typecheck
  • APP_ENV=development pnpm --filter happy-app exec expo config --type prebuild
  • pnpm install --offline --frozen-lockfile --ignore-scripts
  • git diff --check

Manual test

A fresh native development build is required because the React Native SDK and native audio stack changed. Device soak testing should repeat start -> connected -> stop -> start with the public debug agent.

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