openFrameworks addon for real-time text-to-speech using Supertonic
README
ofxSupertonic
openFrameworks addon for fast, local text-to-speech using Supertonic and ONNX Runtime.
What is ofxSupertonic?
ofxSupertonic brings the Supertonic C++ ONNX text-to-speech pipeline into the openFrameworks ecosystem. It provides a C++ wrapper for loading the speech models and voice styles, synthesizing text, and writing the generated audio to WAV files.
This makes it possible to build low-latency, offline speech synthesis into creative coding projects and installations without relying on cloud services.
Tested Environments
ofxSupertonic has been validated on:
x86_64 (Ubuntu 24.04.3 LTS) ARM 64-bit (Raspberry Pi) macOS (Apple Silicon M2) Windows 11 openFrameworks:
of_v0.12.1_linux64_gcc6_releaseSetup
1. Install ONNX Runtime and Models
From the addon root, run:
python3 scripts/install.pyOn Windows, use
python instead if Python is installed under that command:python scripts/install.pyThe installer detects the current operating system and automatically:
1. Downloads and installs the appropriate ONNX Runtime libraries into
libs/onnxruntime. 2. Downloads the Supertonic ONNX models and example voice styles into example_tts/bin/data/models.The default model directory can be changed with
--models-dir. The installer also supports --skip-libs, --skip-models, and --dry-run; run python3 scripts/install.py --help for details.2. Build and Run example_tts
Ubuntu / Debian (Linux) and macOS:
From the addon root, build the example with:
cd example_tts
makeRun the release executable with:
make RunReleaseWindows:
Generate or update
example_tts using the openFrameworks Project Generator. Open the generated Visual Studio solution (.sln), then build and run the example from Visual Studio.License
Copyright (c) 2026 Yannick Hofmann.
BSD Simplified License.
For information on usage and redistribution, and for a DISCLAIMER OF ALL WARRANTIES, see the file
LICENSE.txt in this distribution.
ofxAddons