A Swift Package that provides speech-to-text functionality using Sherpa ONNX for iOS applications. This package bundles the Sherpa ONNX framework as an XCFramework for easy integration with iOS projects targeting iOS 15+.
sherpa-onnx-spm provides an efficient, on-device speech recognition solution built on top of Sherpa ONNX, which is a cross-platform speech-to-text toolkit. The package includes:
onnxruntime- Microsoft's ONNX Runtime for running machine learning modelssherpa_onnx- The Sherpa ONNX speech recognition library- Pre-compiled XCFrameworks for iOS devices
- On-device speech recognition with no network connectivity required
- High-performance audio processing optimized for iOS
- Compatible with iOS 15 and later
- Easy integration via Swift Package Manager
- Lightweight and efficient for mobile applications
To add this package to your Xcode project:
- Open your project in Xcode
- Go to File → Add Package Dependencies
- Enter the repository URL:
https://github.com/fdddf/sherpa-onnx-spm.git - Select the package and add it to your project
Or add it to your Package.swift file:
dependencies: [
.package(url: "https://github.com/fdddf/sherpa-onnx-spm.git", from: "1.12.19")
]After adding the package to your project, you can import and use the speech recognition functionality:
import sherpa_onnx_spm
// Example usage would go hereCurrent version: 1.12.19 (abbe031 - Update Package.swift for 1.12.19 (11 days ago))
The package includes the following pre-compiled frameworks:
- onnxruntime (from https://github.com/fdddf/sherpa-onnx-spm/releases/download/1.12.19/onnxruntime.xcframework.zip)
- sherpa_onnx (from https://github.com/fdddf/sherpa-onnx-spm/releases/download/1.12.19/sherpa-onnx.xcframework.zip)
- iOS 15.0+
- Xcode 14.0+
- Swift 5.7+
This project is licensed under the terms found in the LICENSE file.