Skip to content

3.0.0: Upgrade to React Native 0.88 and Yarn 4 with TurboModule migration - #24

Merged
itsRares merged 15 commits into
mainfrom
feature/3.0.0
Nov 5, 2026
Merged

itsRares merged 15 commits into
mainfrom
feature/3.0.0

Conversation

@itsRares

@itsRares itsRares commented Nov 5, 2026

Copy link
Copy Markdown
Owner

Upgrade the toolchain to Yarn 4, React Native 0.88, and TypeScript 6. Migrate the native module to a TurboModule architecture, introducing typed event emitters and new APIs. Update the example app to showcase the new features and ensure compatibility with the latest Expo SDK. Address various bugs and improve performance across platforms. Include breaking changes and a migration guide for users.

BREAKING CHANGE: ESM-only build output; requires React >= 19 and React Native >= 0.79.
BREAKING CHANGE: requires the New Architecture and React Native >= 0.80.
Native device events are replaced by Deepgram.onAudioPCM, onAudioLevel,
onAudioRouteChange and onAudioInterruption. The iOS MicPermission module is
replaced by Deepgram.requestRecordPermission().
…mplate

Use the monorepo Metro/Babel config, autolink the library through
example/react-native.config.js and load the config plugin by relative path
(drops the postinstall symlink). Migrate to the new expo-file-system API and
react-native-safe-area-context, add Android/iOS example builds to CI, and make
Deepgram.stopRecording() resolve null consistently.
Extract ManagedSocket (auth, reconnect backoff, stale-event guard),
createKeepAlive, useSessionStats, PCM helpers, listen/speak URL builders and
agent-settings helpers into src/internal, and rebuild the speech-to-text,
text-to-speech and Voice Agent hooks on top of them. Adds characterization
tests for all three hooks plus unit tests for the internals, and fixes the
races and bugs listed in the changelog.
- configure() sends mid-stream Configure (keyterms/numerals on Nova-3,
  thresholds/keyterms/language_hints/numerals on Flux)
- forceEndTurn() for Flux
- onTurnInfo and onMessage callbacks; typed TurnInfo/Configure options
- Flux URLs forward numerals and redact; language_hint for Nova-3 multi
- nova-3-pharma model, aggressive_numbers redaction

BREAKING CHANGE: the deprecated diarize option is removed, use diarizeModel.
- flux-* voices stream from /v2/speak and use the v2 REST endpoint
- interrupt() and configureStream() for Flux; expressivity and stream tag
- onSpeechStarted, onSpeechMetadata, onSpeechInterrupted, onStreamMessage
- Flux sendText keeps whitespace; clearStream interrupts on Flux
- Aura-2 de/fr/nl/it/ja voices and the Flux English catalog in model types

BREAKING CHANGE: the deprecated top-level TTS options, http.format, the
DeepgramTextToSpeechEncoding alias and the Text stream message are removed.
- forceEndTurn(), updateThinkLive(), dynamic and interrupt injections
- onLatencyReport, onFunctionCallCancelled, onFrustrationDetected,
  onThinkLiveUpdated and onCustomFromThinkProvider callbacks
- typed listen v1/v2 and speak (flux/aura) providers, think_live,
  defer_until_eot, reasoning_mode and agent configuration ids
- createAgentSettings builds Flux-correct providers and takes speakModel

BREAKING CHANGE: agent.language is removed from the settings types and
createAgentSettings puts the language on the listen provider instead.
- iOS: track the mic capture rate separately from the playback rate so PCM
  events and WAV headers stay at 16 kHz after startPlayer
- iOS: keep the session while a streaming player is prepared, restart a
  stopped engine on feedAudio, resolve one-shots after playback
- iOS: run spec methods and session notifications on one serial queue
- iOS: fix simulator Voice Agent capture ("Invalid input format"), no
  RedBox for rejected promises or session fallbacks
- synthesize() sets the player rate, respects autoPlayAudio, skips
  non-PCM playback; Voice Agent caps the declared mic input rate at 16 kHz
- Android: non-sticky keep-alive service, startPlayer never throws
- keep test helpers and __tests__ declarations out of the published types
- README: Migrating from 2.x section, telemetry (trackStats/getStats/stats)
  and onAudioConfig docs, React Native 0.80 iOS/Xcode minimums, Flux TTS
- release-it tags match the existing bare-version tags and the podspec
- release workflow writes the npm token to .npmrc
- speech-to-text: Nova-3 / Nova-3 multilingual / Flux picker, Flux turn
  indicator and End turn, live keyterm configure() with server status
- text-to-speech: Flux interrupt, mid-stream speed, expressivity, turn
  events; 24/48 kHz rates and 24 kHz defaults
- voice agent: Flux listen models, Flux/Aura voice picker with live switch,
  latency report, end-my-turn and agent message injection
- missing API key banner, Android-safe monospace font
- Bottom tab bar (Agent/Listen/Speak/Intel/Manage) with safe-area insets
  and a compact header (eyebrow, screen title, one-line description).
- New SegmentedControl for audio routes, STT engines and caption modes.
- Decorative capability chips replaced by a mono "pipeline" pill showing
  the active models.
- Compact heroes; Intel/Manage heroes dropped in favour of card headers
  with status badges, removing the duplicated screen titles.
- Even two-column button grids (flexButton) instead of ragged rows.
Ported from a downstream app's patch-package fix.

Other libraries commonly declare FOREGROUND_SERVICE, so with
backgroundAudio: false on Android 10-13 the permission check passed and
startForegroundService() ran. startForeground() then threw because the
service declares no foregroundServiceType, and the unfulfilled
startForegroundService() crashed the app.

The keep-alive service now also requires the merged manifest to declare
the mediaPlayback type, and only adds the microphone type when declared.
The iOS Simulator has no VPIO and the Android emulator exposes no
AcousticEchoCanceler, so the Voice Agent hears itself through the host
speakers and barges in on its own audio. Show a banner on the Agent
screen when running on a simulator/emulator (expo-device) suggesting
headphones or a physical device.
@itsRares
itsRares merged commit 98877d4 into main Nov 5, 2026
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