sdk/runanywhere-swift/Sources/ONNXRuntime/README.md
ONNX/Sherpa backend for the RunAnywhere Swift SDK — on-device STT, TTS, and VAD on Apple platforms.
Add the Swift package and include the RunAnywhereONNX product (pin 0.20.12):
dependencies: [
.package(url: "https://github.com/RunanywhereAI/runanywhere-sdks", exact: "0.20.12"),
],
targets: [
.target(
name: "YourApp",
dependencies: [
.product(name: "RunAnywhere", package: "runanywhere-sdks"),
.product(name: "RunAnywhereONNX", package: "runanywhere-sdks"),
]
)
]
See the Swift SDK README for Xcode setup and API keys.
import RunAnywhere
import ONNXRuntime
@MainActor
func bootstrap() throws {
ONNX.register()
try RunAnywhere.initialize(
apiKey: "<YOUR_API_KEY>",
baseURL: "https://api.runanywhere.ai",
environment: .production
)
}
// Load models and transcribe via RunAnywhere core APIs
let output = try await RunAnywhere.transcribe(audio: audioData)
print(output.text)
See the Swift SDK README for TTS, VAD, and voice-agent flows.
RunAnywhere License. See LICENSE.