Files
fbdp1202 912c54b435 fix: Supertonic 3 compatibility across all language examples
- README Quick Start: format `duration[0]` instead of the ndarray itself
  (numpy refuses `f"{ndarray:.2f}"`; matches official `dur[0]:.2f` pattern)
- py/example_pypi.py: print synthesized duration to mirror the docstring example
- Add `"na"` to AVAILABLE_LANGS / Languages.Available / availableLangs
  across all 11 runtimes (Python/Node/Web/Java/C++/C#/Go/Swift/Rust/Flutter/iOS)
  so the language-agnostic fallback advertised in the README actually passes
  per-runtime lang validation before being sent to the v3 ONNX duration predictor

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-15 23:22:42 +09:00
..
2026-05-06 23:09:06 +02:00

Supertonic iOS Example App

A minimal iOS demo that runs Supertonic 3 (ONNX Runtime) on-device. The app shows:

  • Multiline text input
  • NFE (denoising steps) slider
  • Voice toggle (M/F)
  • Language selector for 31 supported languages
  • Generate & Play buttons
  • RTF display (Elapsed / Audio seconds)

All ONNX models/configs are reused from Supertonic/assets/onnx, and voice style JSON files from Supertonic/assets/voice_styles.

📰 Update News

2026.04.29 - 🎉 Supertonic 3 released with 31-language support, improved reading accuracy, and v2-compatible public ONNX assets. Demo | Models

2025.12.10 - Added 6 new voice styles (M3, M4, M5, F3, F4, F5). See Voices for details

2025.12.08 - Optimized ONNX models via OnnxSlim now available on Hugging Face Models

Prerequisites

  • macOS 13+, Xcode 15+
  • Swift 5.9+
  • iOS 15+ device (recommended)
  • Homebrew, XcodeGen

Install tools (if needed):

brew install xcodegen

Quick Start (zero-click in Xcode)

  1. Prepare assets next to the iOS target (one-time)
cd ios/ExampleiOSApp
mkdir -p onnx voice_styles
rsync -a ../../assets/onnx/ onnx/
rsync -a ../../assets/voice_styles/ voice_styles/
  1. Generate the Xcode project with XcodeGen
xcodegen generate
open ExampleiOSApp.xcodeproj
  1. Open in Xcode and select your iPhone as the run destination
  • Targets → ExampleiOSApp → Signing & Capabilities: Select your Team
  • iOS Deployment Target: 15.0+
  1. Build & Run on device
  • Type text → adjust NFE/Voice → Tap Generate → Audio plays automatically
  • An RTF line shows like: RTF 0.30x · 3.04s / 10.11s

What's included (generated project)

  • SwiftUI app files: App.swift, ContentView.swift, TTSViewModel.swift, AudioPlayer.swift
  • Runtime wrapper: TTSService.swift (includes TTS inference logic)
  • Resources (local, vendored in ios/ExampleiOSApp/onnx and ios/ExampleiOSApp/voice_styles after step 0)

These references are defined in project.yml and added to the app bundle by XcodeGen.

App Controls

  • Text: Multiline TextEditor
  • NFE: Denoising steps (default 8)
  • Voice: M/F voice style selector
  • Language: Language selector for 31 supported languages
  • Generate: Runs end-to-end synthesis
  • Play/Stop: Controls playback of the last output
  • RTF: Shows Elapsed / Audio seconds for quick performance intuition

Multilingual Support

Supertonic 3 supports 31 languages. Select the appropriate language for your input text; see the main README for the full code list.