Skip to content

feat: add iOS TTS support using ONNX Runtime#378

Closed
AnthonyRonning wants to merge 22 commits intomasterfrom
ios-tts
Closed

feat: add iOS TTS support using ONNX Runtime#378
AnthonyRonning wants to merge 22 commits intomasterfrom
ios-tts

Conversation

@AnthonyRonning
Copy link
Copy Markdown
Contributor

@AnthonyRonning AnthonyRonning commented Jan 9, 2026

Summary

Add Text-to-Speech (TTS) support for iOS using ONNX Runtime, enabling the Supertonic TTS model to run on-device on iPhones and iPads.

Changes

  • Cargo.toml: Add iOS-specific dependencies for ort and other TTS libraries
  • build.rs: Add iOS-specific linker configuration for ONNX Runtime xcframework
  • lib.rs: Enable TTS module for iOS (was desktop-only), add TTS commands to iOS invoke handler
  • tts.rs: Add iOS-specific path handling for TTS model storage (~/Documents/tts_models)
  • TTSContext.tsx: Update frontend to enable TTS on iOS
  • GitHub Actions: Add steps to download ONNX Runtime xcframework before iOS builds
  • setup-ios-onnxruntime.sh: New script to download pre-built ONNX Runtime 1.20.1 xcframework

Technical Details

  • Uses pre-built ONNX Runtime 1.20.1 xcframework from csukuangfj/ios-onnxruntime on HuggingFace
  • Static libraries are cached in GitHub Actions to speed up builds
  • TTS models (~264MB) are downloaded on-demand, same as desktop
  • Memory usage ~500MB RAM, suitable for modern iOS devices

Testing

  • Test on iOS simulator
  • Test on physical iOS device
  • Verify model download works on iOS
  • Verify TTS playback works on iOS

Notes

This is the first step toward iOS TTS. The implementation mirrors the desktop version - users will need to download the TTS models (~264MB) before use.

Summary by CodeRabbit

  • New Features

    • TTS now available on iOS with dedicated app initialization, deep-link handling, updater integration, and iOS-specific model/engine management.
    • UI surfaces TTS playback errors via notifications; TTS context exposes lastPlaybackError for apps to consume.
  • Chores

    • Enhanced iOS build and deployment pipeline: caching with build-from-source fallback, artifact verification, generated link configuration, runtime library propagation, and TestFlight trigger adjustments.

✏️ Tip: You can customize this high-level summary in your review settings.

Loading
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.

1 participant