Repository navigation
fix(ios): make feedStreamingAudio work and move to FluidAudio 0.17 - #5
Draft
Alex-Wengg wants to merge 1 commit into
Draft
Alex-Wengg wants to merge 1 commit into
Alex-Wengg wants to merge 1 commit into
Conversation
feedStreamingAudio resolved success without using its audio, so a JS-fed session produced no transcript and no error. The podspec also pinned FluidAudio ~> 0.7, and CocoaPods trunk stops at 0.7.8, before StreamingAsrManager became a protocol. - Pull FluidAudio 0.17.7+ (up to next minor) from GitHub through React Native's spm_dependency podspec helper; peer react-native >= 0.75. Drop the pod 'FluidAudio' line from the example Podfile. - Port the module to FluidAudio 0.17: streaming through StreamingModelVariant.createManager() (default Parakeet EOU 320 ms, any variant by its raw name), AsrManager.loadModels(_:) and an explicit TdtDecoderState per transcribe. - Streaming takes audio from one ordered queue, fed by the microphone tap or by feedStreamingAudio; stop drains it before finish(). A new 'manual' source skips the microphone; feeding a microphone session is rejected instead of ignored. Decode base64 PCM16 unaligned. - The last streaming manager stays loaded for the next session. - Example: "Stream Sample File" feeds a bundled 16.9 s clip (FluidAudio test fixture) in 320 ms chunks; add NSMicrophoneUsageDescription. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #4.
Problem
feedStreamingAudiodiscarded the audio it was given and still resolvedsuccess: true. Streaming only worked through the microphone tap thatstartStreamingAsrinstalls itself.FluidAudio ~> 0.7. CocoaPods trunk stops at 0.7.8 (Nov 2025) and goes read-only on December 2, 2026. 0.7.8 predates FluidAudio's current streaming managers, and theStreamingAsrManagerclass this module used was removed upstream.Change
spm_dependency(FluidAudio 0.17.7 or later, up to the next minor). The React Native peer dependency is now 0.75 or later, and the podspec stops with a clear error on older versions.pod 'FluidAudio'is removed from the example Podfile.StreamingModelVariant.createManager(). The default model isparakeet-eou-320ms, the one FluidAudio's own iOS streaming demos use; JS can choose another with the newmodeloption.feedStreamingAudioworks: base64 PCM16 is decoded and fed to the manager. A newsource: 'manual'starts a session without the microphone. Feeding a microphone session now rejects instead of silently dropping audio. The microphone tap and fed audio go through one ordered queue, andstopdrains it before finishing.NSMicrophoneUsageDescription, without which iOS kills the microphone demo on a device.Breaking changes for JS users
start({ source: 'manual' }).source: 'system'is removed.StreamingUpdate.volatileis always empty; the transcript is inconfirmedandtext.start()andfeednow return{ success, source, model }and{ success, samples }.Verification
npx tsc --noEmitpasses.npx jest: 54/54.pod installinexample/iosresolves FluidAudio 0.17.7.xcodebuildbuilds the example forgeneric/platform=iOSandgeneric/platform=iOS Simulator.Not yet verified on a device: model download, the sample-file transcript, and microphone streaming. This stays a draft until that's done.
🤖 Generated with Claude Code