Repository

Supertonic_3_TTS_App

On-device neural text-to-speech for win-x64 Powered by Supertonic 3, Tauri 2, React, and ONNX Runtime Web with GPU acceleration. Fully offline & portable

Feature
Details
On-device inference
On-device inference
10 built-in voices
10 built-in voices
Custom voice cloning
Custom voice cloning

Specs

  • FeatureDetails
  • On-device inferenceOn-device inference
  • 10 built-in voices10 built-in voices
  • Custom voice cloningCustom voice cloning
  • File inputFile input
  • GPU / CPU selectionGPU / CPU selection
  • CPU usage controlCPU usage control
  • Steps controlSteps control
  • Speed controlSpeed control
  • App volumeApp volume
  • Normalize outputNormalize output
  • Waveform seekbarWaveform seekbar
  • Audio historyAudio history
  • MP3 & WAV exportMP3 & WAV export
  • Dark / Light themeDark / Light theme
  • 5 accent colors5 accent colors
  • UI scalingUI scaling
  • 7 UI languages7 UI languages
  • Resizable panelsResizable panels
  • Window stateWindow state
  • Portable installerPortable installer
  • SHA-256 verificationSHA-256 verification
  • FilePurpose
  • tts.jsonVoice configuration
  • text_encoder.onnxText encoding model
  • duration_predictor.onnxDuration prediction model
  • vector_estimator.onnxVector estimation model
  • vocoder.onnxAudio vocoder model
  • unicode_indexer.jsonUnicode indexing map
  • SettingOptions
  • ThemeDark / Light
  • Accent ColorPurple, Blue, Green, Red, Yellow
  • GPU / CPUWebGPU / multi-threaded WASM SIMD
  • CPU Usage10% – 100% of detected logical CPU threads
  • App Volume0% – 100%
  • UI Scale80% – 150%
  • App LanguageEnglish, 中文, Español, Français, Ελληνικά, Русский, 日本語
  • Normalize OutputOn / Off
  • MP3 Bitrate128 / 192 / 320 kbps
  • Steps5 – 16

README

Supertonic 3

Supertonic 3 — TTS App

On-device neural text-to-speech for Windows, powered by Supertone's Supertonic 3 engine.

<p align="center"><strong>English</strong> | <a href="README_ZH.md">中文</a></p>
</p>

Supertone Engine HuggingFace Models Rust Tauri React TypeScript Windows Portable NSIS

Screenshot 2026-05-27 041515

What It Does

Supertonic 3 TTS App is a fully offline text-to-speech application that runs neural TTS inference entirely on your device. No cloud, no API keys, no data leaves your machine.

It wraps the Supertone Supertonic 3 ONNX models inside a Tauri 2 desktop app with a premium two-column UI built with React and TypeScript. Audio generation uses ONNX Runtime Web with GPU acceleration via WebGPU and a multi-threaded WASM CPU fallback.

Key Features

Feature Details
On-device inference ONNX Runtime Web — GPU (WebGPU) or multi-threaded CPU (WASM SIMD + SharedArrayBuffer)
10 built-in voices 5 female (F1–F5) and 5 male (M1–M5) English voices
Custom voice cloning Load .json voice style embeddings trained with supertonic_embeddings_trainer
File input Import .txt, .pdf, .docx, .md files (20 MB limit for PDF/DOCX)
GPU / CPU selection Switch between GPU and CPU providers at any time
CPU usage control CPU mode auto-detects logical CPU threads and lets users choose 10%–100% usage (75% default)
Steps control 5 (fastest) to 16 (highest quality) — adjustable speed/quality tradeoff
Speed control 0.5× to 2.0× playback speed with warning above 1.6×
App volume App-wide playback volume slider (80% default) for generated audio, history, and voice previews
Normalize output Peak normalization toggle — applies to playback, history, and downloads
Waveform seekbar Click the waveform to seek to any position during playback
Audio history Current generation stays in the main view; up to 6 previous generations are shown in history
MP3 & WAV export Save as WAV or MP3 (128 / 192 / 320 kbps) with timestamped filenames to avoid overwrites
Dark / Light theme System-aware theme toggle
5 accent colors Purple, Blue, Green, Red, Yellow
UI scaling 80% to 150% zoom slider
7 UI languages English, 中文, Español, Français, Ελληνικά, Русский, 日本語
Resizable panels Drag the divider between input and output (320–800 px)
Window state Remembers position and size between sessions
Portable installer NSIS portable EXE — no UAC, no registry, no admin required
SHA-256 verification All model files are hash-verified on download

Architecture

┌─────────────────────────────────────────────────┐
│                   Tauri 2 Shell                 │
│  ┌──────────────────────┐  ┌─────────────────┐  │
│  │   React + TypeScript │  │   Rust Backend   │  │
│  │                      │  │                  │  │
│  │  • UI & State        │  │  • File I/O      │  │
│  │  • ONNX Runtime Web  │  │  • PDF extraction│  │
│  │  • WebGPU / WASM     │  │  • DOCX parsing  │  │
│  │  • Audio playback    │  │  • Save dialogs  │  │
│  │  • MP3 encoding      │  │  • Clipboard     │  │
│  └──────────────────────┘  └─────────────────┘  │
└─────────────────────────────────────────────────┘

Frontend handles all ML inference, audio processing, and encoding in-browser via ONNX Runtime Web + lamejs-fixed.

Rust backend handles filesystem access (read files, save audio, extract text from PDF/DOCX), clipboard, native dialogs, WebView headers for SharedArrayBuffer, and logical CPU thread detection. Zero sidecars, zero Python, zero FFmpeg.


Prerequisites


Getting Started

Want the prebuilt app? Download the latest release — portable EXE or NSIS installer, no build tools needed.

1. Clone

git clone https://github.com/Saganaki22/Supertonic_3_TTS_App.git
cd Supertonic_3_TTS_App

2. Install dependencies

npm install

3. Download models

The app fetches models at runtime from HuggingFace on first load and caches them in the browser. No manual download required — but you need an internet connection the first time you load a voice.

The following 6 files are fetched and SHA-256 verified:

File Purpose
tts.json Voice configuration
text_encoder.onnx Text encoding model
duration_predictor.onnx Duration prediction model
vector_estimator.onnx Vector estimation model
vocoder.onnx Audio vocoder model
unicode_indexer.json Unicode indexing map

Models are sourced from HuggingFace Supertone/supertonic-3.

4. Development

npm run tauri dev

Opens the app in development mode with hot-reload.

5. Build

npm run tauri build

Produces a portable NSIS installer at:

src-tauri/target/release/bundle/nsis/Supertonic 3 TTS App_0.1.4_x64-setup.exe

And the raw executable at:

src-tauri/target/release/supertonic-3-tts-app.exe

6. Compress (optional)

Using UPX:

upx --best --lzma src-tauri/target/release/supertonic-3-tts-app.exe

This typically reduces the exe from ~12 MB to ~7.2 MB.


Project Structure

├── index.html                  # Vite entry point
├── package.json                # npm config
├── tsconfig.json               # TypeScript config
├── vite.config.ts              # Vite config
├── public/
│   ├── assets/logo.png         # App logo
│   └── voice-samples/          # Voice sample WAVs (F1–F5, M1–M5)
├── scripts/
│   └── copy-ort-assets.js      # Copies ONNX Runtime Web assets for dev/prod
├── src/
│   ├── main.tsx                # Entry point, global event handlers
│   ├── App.tsx                 # Root component, layout, state
│   ├── App.css                 # All styles (themes, components)
│   ├── vite-env.d.ts           # Vite type declarations
│   ├── lamejs.d.ts             # Type declarations for lamejs-fixed
│   ├── components/
│   │   ├── Header.tsx          # Logo, brand, settings, status badge
│   │   ├── Footer.tsx          # Version, GitHub link
│   │   ├── SettingsPanel.tsx   # Theme, accent, provider, CPU usage, volume, UI scale
│   │   ├── StatusBadge.tsx     # Model status + GPU/CPU chevron dropdown
│   │   ├── TextInput.tsx       # Textarea with char count, paste, browse
│   │   ├── VoiceGrid.tsx       # 10-voice selector grid
│   │   ├── VoiceControls.tsx   # Steps & speed sliders
│   │   ├── VoiceClone.tsx      # Custom voice .json upload
│   │   ├── OutputPanel.tsx     # Waveform, player, timestamped WAV/MP3 export
│   │   ├── AudioHistory.tsx    # Up to 6 previous generations
│   │   ├── PanelResize.tsx     # Resizable panel divider
│   │   ├── CachePanel.tsx      # Model cache info
│   │   ├── ProgressBar.tsx     # Generation progress bar
│   │   └── Toast.tsx           # Toast notifications
│   ├── hooks/
│   │   ├── useTTS.ts           # ONNX engine state management
│   │   ├── useAudioPlayer.ts   # Web Audio playback + seeking
│   │   └── useAudioHistory.ts  # Six-item audio history
│   └── lib/
│       ├── tts.ts              # ONNX inference engine, explicit ORT assets, SHA-256
│       ├── helpers.ts          # chunkText, normalizeAudio, wavToMp3
│       └── tauri.ts            # Typed Tauri invoke wrappers
└── src-tauri/
    ├── Cargo.toml              # Rust dependencies
    ├── tauri.conf.json         # Tauri window, bundle, CSP config
    ├── build.rs                # Tauri build script
    ├── capabilities/
    │   └── default.json        # Tauri permission capabilities
    ├── icons/                  # App icons (ico, png)
    └── src/
        ├── main.rs             # Rust entry point
        ├── lib.rs              # Plugin registration, WebView headers, window setup
        └── commands/
            ├── mod.rs          # Command module exports
            ├── fs.rs           # read_text_file, save_wav/mp3_file
            ├── pdf.rs          # extract_pdf_text (20 MB limit)
            ├── docx.rs         # extract_docx_text (20 MB limit)
            └── system.rs       # logical_cpu_count for CPU thread auto-detection

Configuration

All settings are accessible from the gear icon in the header:

Setting Options Default
Theme Dark / Light Dark
Accent Color Purple, Blue, Green, Red, Yellow Purple
GPU / CPU WebGPU / multi-threaded WASM SIMD GPU (auto-fallback)
CPU Usage 10% – 100% of detected logical CPU threads 75%
App Volume 0% – 100% 80%
UI Scale 80% – 150% 100%
App Language English, 中文, Español, Français, Ελληνικά, Русский, 日本語 English
Normalize Output On / Off Off
MP3 Bitrate 128 / 192 / 320 kbps 192 kbps
Steps 5 – 16 8
Speed 0.5× – 2.0× 1.0×

Settings persist in localStorage. Window position and size persist via tauri-plugin-window-state.


Custom Voice Styles

Train your own voice embeddings using the companion trainer:

Saganaki22/supertonic_embeddings_trainer

Export a .json file containing style_ttl and style_dp tensors, then load it via the "Custom voice" section in the app. The file is validated on load (JSON schema, tensor dimensions, data length).


Voice Samples

Built-in voices are English neural TTS voices. Sample audio files are in public/voice-samples/:

  • F1–F5: Female voices (English)
  • M1–M5: Male voices (English)

Tech Stack

Layer Technology
Shell Tauri 2 (Rust)
Frontend React 19 + TypeScript
Bundler Vite 7
ML Runtime ONNX Runtime Web 1.26
Audio Playback Web Audio API
MP3 Encoding lamejs-fixed (in-browser)
PDF Parsing pdf-extract (Rust)
DOCX Parsing docx-rs (Rust)
Installer NSIS (portable, no UAC)
Compression UPX (optional)

License

This project (application code) is licensed under the MIT License.

The accompanying TTS model is released under the OpenRAIL-M License. See the LICENSE file in the model repository for details.

The TTS engine is developed by Supertone. Models are fetched from HuggingFace Supertone/supertonic-3.