Skip to content

fix(moonshine.rn/android): consume Moonshine 0.1.5 and lower minSdk to 26 - #473

Closed
petewarden wants to merge 1 commit into
deeeed:mainfrom
petewarden:fix/moonshine-rn-android-minsdk-26
Closed

fix(moonshine.rn/android): consume Moonshine 0.1.5 and lower minSdk to 26#473
petewarden wants to merge 1 commit into
deeeed:mainfrom
petewarden:fix/moonshine-rn-android-minsdk-26

Conversation

@petewarden

@petewarden petewarden commented Aug 22, 2026

Copy link
Copy Markdown

Summary

Addresses #425. Credit to #435 for proving the native libraries load at API 26 and documenting why a Maven bump to 0.1.3 did not compile.

ai.moonshine:moonshine-voice:0.1.5 is now on Maven Central (release). That AAR declares minSdkVersion="26" and exposes a public EmbeddingModel plus TranscriptLine.speakerSpans, so this wrapper can keep its existing JS intent and speaker fields without adopting AgentFlow.

What changed:

  • Default Maven coordinate 0.0.590.1.5; wrapper minSdk floor 35 → 26
  • addAudioToStream / loadTranscriberFromMemory updated to the current JNI signatures
  • Intent recognition reimplemented on EmbeddingModel (register phrases, cosine match). JS createIntentRecognizer / processUtterance unchanged
  • hasSpeakerId / speakerId / speakerIndex derived from speakerSpans (longest-duration span; first span on a tie)
  • iOS xcframework, source-AAR pin, and moonshineCommit left at v0.0.59

Checked against the published 0.1.5 AAR: EmbeddingModel and embedding JNI methods are public; moonshineAddAudioToStream is the 5-arg form; loadTranscriberFromMemory takes the optional spelling buffer; TranscriptLine has speakerSpans and no per-line hasSpeakerId. libmoonshine.so still imports OrtGetApiBase@VERS_1.23.2, so the Sherpa coexistence note stays.

Test plan

  • ai.moonshine:moonshine-voice:0.1.5 is on Maven Central
  • yarn workspace @siteed/moonshine.rn test and typecheck
  • Android compile against Maven 0.1.5 (SITEED_MOONSHINE_ANDROID_USE_MAVEN=1), without tools:overrideLibrary
  • Playground Android build with minSdkVersion: 26
  • Smoke transcription + intent matching + identifySpeakers on an API 26 emulator
  • Confirm iOS still uses the pinned v0.0.59 xcframework

…o 26

Addresses deeeed#425. Maven consumers can use API 26 once moonshine-voice 0.1.5
is published: intent matching uses the public EmbeddingModel API, and
per-line speakerId is derived from speakerSpans. iOS stays on v0.0.59.

Co-authored-by: Cursor <cursoragent@cursor.com>
@petewarden
petewarden force-pushed the fix/moonshine-rn-android-minsdk-26 branch from f633712 to 92804d8 Compare August 25, 2026 00:35
@petewarden
petewarden marked this pull request as ready for review August 25, 2026 00:36
@sonarqubecloud

Copy link
Copy Markdown

@deeeed

deeeed commented Aug 25, 2026

Copy link
Copy Markdown
Owner

Thanks for putting this together, Pete, and for shipping Moonshine 0.1.5. That upstream release unblocked us.

We landed the wrapper update separately in #486. It includes minSdk 26, completed-line speaker revisions, intent matching fixes and tests, and an isolated ONNX Runtime so Moonshine can load alongside Sherpa.

This is now published as @siteed/moonshine.rn 0.4.1. I'll close this PR as superseded. Thanks again for helping us get there.

@deeeed deeeed closed this Aug 25, 2026
@petewarden

Copy link
Copy Markdown
Author

That's great to hear, thanks!

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.

2 participants