Skip to content

Add missing files for swift package manager - #3828

Merged
csukuangfj merged 1 commit into
k2-fsa:masterfrom
csukuangfj:fix-ios-spm
Jul 30, 2026
Merged

csukuangfj merged 1 commit into
k2-fsa:masterfrom
csukuangfj:fix-ios-spm

Conversation

@csukuangfj

@csukuangfj csukuangfj commented Jul 30, 2026 •

Copy link
Copy Markdown
Collaborator

Summary by CodeRabbit

  • New Features
    • Added a Swift interface for speech recognition, including online and offline transcription.
    • Added support for voice activity detection, text-to-speech, language identification, keyword spotting, punctuation, speaker diarization, and speaker embeddings.
    • Added speech denoising and source separation capabilities.
    • Added audio loading, processing, and saving utilities.
    • Added access to library and runtime version information.

@gemini-code-assist

Copy link
Copy Markdown

Caution

The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased.

@dosubot dosubot Bot added the size:XXL This PR changes 1000+ lines, ignoring generated files. label Jul 30, 2026
@coderabbitai

coderabbitai Bot commented Jul 30, 2026 •

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 526a7b76-fe54-4ce7-8c26-817c24700096

📥 Commits

Reviewing files that changed from the base of the PR and between 88bbc82 and 821a465.

📒 Files selected for processing (2)
  • swift-api-examples/SherpaOnnx-Bridging-Header.h
  • swift-api-examples/SherpaOnnx.swift

📝 Walkthrough

Walkthrough

Adds a Swift bridging header and a comprehensive Swift wrapper over Sherpa-ONNX C APIs, covering ASR, VAD, TTS, speech analysis, denoising, audio handling, source separation, and library metadata.

Changes

Swift API expansion

Layer / File(s) Summary
Bridging and ASR configuration
swift-api-examples/SherpaOnnx-Bridging-Header.h, swift-api-examples/SherpaOnnx.swift
Adds C API bridging and Swift builders for online and offline ASR configurations.
ASR and voice activity runtime
swift-api-examples/SherpaOnnx.swift
Adds streaming and offline recognizers, result wrappers, VAD support, circular buffers, and speech segments.
Offline TTS and callback bridge
swift-api-examples/SherpaOnnx.swift
Adds TTS model configuration, audio wrappers, generation settings, callbacks, and generation methods.
Speech analysis and enhancement utilities
swift-api-examples/SherpaOnnx.swift
Adds language identification, keyword spotting, punctuation, diarization, speaker embeddings, denoising, and version accessors.
Source separation audio model
swift-api-examples/SherpaOnnx.swift
Adds multi-channel audio data, source-separation configuration, stem processing, and C resource cleanup.

Estimated code review effort: 5 (Critical) | ~120 minutes

Sequence Diagram(s)

sequenceDiagram
  participant SwiftClient
  participant SherpaOnnxRecognizer
  participant SherpaOnnxOnlineRecognitionResult
  SwiftClient->>SherpaOnnxRecognizer: acceptWaveform(samples)
  SwiftClient->>SherpaOnnxRecognizer: decode()
  SherpaOnnxRecognizer-->>SherpaOnnxOnlineRecognitionResult: getResult()
  SherpaOnnxOnlineRecognitionResult-->>SwiftClient: text, tokens, timestamps
Loading

Possibly related PRs

Suggested labels: size:XL

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@csukuangfj
csukuangfj merged commit 5e4232d into k2-fsa:master Jul 30, 2026
2 of 3 checks passed
@csukuangfj
csukuangfj deleted the fix-ios-spm branch July 30, 2026 03:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XXL This PR changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant