What Programming Languages Does Supertonic Support? Complete Multi-Runtime SDK Guide
Supertonic supports 11 programming languages including Python, Node.js, Java, C++, C#, Go, Swift, Rust, and Flutter through a unified ONNX Runtime backend that enables cross-platform neural speech synthesis without code changes.
Supertonic by supertone-inc is a multi-runtime SDK designed for on-device neural text-to-speech synthesis. Because the core engine runs via ONNX Runtime, it is language-agnostic and provides native bindings for every major programming ecosystem. The repository explicitly documents these supported programming languages in the "Multi-Runtime SDKs" section of the README, ensuring developers can deploy the same speech synthesis model across desktop, server, mobile, and web environments.
Complete List of Programming Languages Supertonic Supports
The supertone-inc/supertonic repository maintains production-ready SDKs for the following programming languages, each organized in dedicated top-level directories:
- Python (
py/) – The primary reference implementation using ONNX Runtime Python bindings. - Node.js (
nodejs/) – Server-side JavaScript implementation for backend applications. - Browser/WebGPU (
web/) – Client-side inference viaonnxruntime-webwith WebGPU/Wasm support. - Java (
java/) – Cross-platform JVM support for enterprise applications. - C++ (
cpp/) – High-performance native implementation for resource-constrained environments. - C#/.NET (
csharp/) – .NET 9+ support for Windows and cross-platform .NET applications. - Go (
go/) – Go bindings that call the ONNX Runtime C library. - Swift (
swift/) – macOS native SDK for Apple ecosystem development. - iOS (
ios/) – Native Swift iOS app implementation. - Rust (
rust/) – Memory-safe systems implementation. - Flutter (
flutter/) – Cross-platform mobile and desktop UI framework support.
According to the source code analysis, the README's "Multi-Runtime SDKs" section [L29-L30] explicitly calls out this set of supported platforms, with a detailed table enumerating each language and its corresponding source tree path [L321-L332].
Cross-Platform Architecture
Supertonic achieves multi-language support by implementing a language-agnostic core engine that runs on ONNX Runtime. Each SDK follows the same inference contract, meaning the identical Supertonic model works across all languages without modification.
The architecture enables developers to choose the programming environment that best fits their application requirements—whether building a Python-based server, a Rust systems service, or a Flutter mobile application—while maintaining consistent speech synthesis quality and performance characteristics.
Code Examples by Programming Language
Each supported language implements the same high-level API: initialize the TTS class, retrieve a voice style, synthesize text, and save audio output. Below are implementation examples from the official source code.
Python Example
The Python implementation in py/example_onnx.py demonstrates the reference API:
from supertonic import TTS
tts = TTS(auto_download=False) # model already in assets/
style = tts.get_voice_style(voice_name="M1")
wav, duration = tts.synthesize(
text="Supertonic runs everywhere.",
lang="en",
voice_style=style,
total_steps=8,
speed=1.0,
)
tts.save_audio(wav, "out.wav")
Source: py/example_onnx.py [L62-L73]
Node.js Example
The Node.js implementation in nodejs/example_onnx.js uses async/await pattern:
const { TTS } = require("./helper.js");
(async () => {
const tts = new TTS({ autoDownload: false });
const style = await tts.getVoiceStyle("M1");
const { wav, duration } = await tts.synthesize({
text: "Supertonic runs everywhere.",
lang: "en",
voiceStyle: style,
totalSteps: 8,
speed: 1.0,
});
await tts.saveAudio(wav, "out.wav");
})();
Source: nodejs/example_onnx.js [L42-L53]
Rust Example
The Rust implementation in rust/src/example_onnx.rs provides memory-safe synthesis:
use supertonic::tts::TTS;
fn main() -> Result<()> {
let tts = TTS::new(false)?;
let style = tts.get_voice_style("M1")?;
let (wav, duration) = tts.synthesize(
"Supertonic runs everywhere.",
"en",
&style,
8,
1.0,
)?;
tts.save_audio(&wav, "out.wav")?;
println!("Generated {} s", duration);
Ok(())
}
Source: rust/src/example_onnx.rs [L94-L108]
C++ Example
The C++ implementation in cpp/example_onnx.cpp offers high-performance native execution:
#include "helper.h"
int main() {
TTS tts(false); // assets already present
auto style = tts.getVoiceStyle("M1");
auto [wav, duration] = tts.synthesize(
"Supertonic runs everywhere.", "en", style, 8, 1.0);
tts.saveAudio(wav, "out.wav");
std::cout << "Generated " << duration << " s\n";
}
Source: cpp/example_onnx.cpp [L63-L71]
Go Example
The Go implementation in go/example_onnx.go binds to the ONNX Runtime C library:
package main
import (
"github.com/supertone-inc/supertonic/go/helper"
)
func main() {
tts, _ := helper.NewTTS(false)
style, _ := tts.GetVoiceStyle("M1")
wav, dur, _ := tts.Synthesize(
"Supertonic runs everywhere.", "en", style, 8, 1.0)
tts.SaveAudio(wav, "out.wav")
fmt.Printf("Generated %.2f s\n", dur)
}
Source: go/example_onnx.go [L78-L86]
Flutter Example
The Flutter implementation in flutter/lib/main.dart enables cross-platform mobile synthesis:
final tts = TTS(autoDownload: false);
final style = await tts.getVoiceStyle('M1');
final result = await tts.synthesize(
text: 'Supertonic runs everywhere.',
lang: 'en',
voiceStyle: style,
totalSteps: 8,
speed: 1.0,
);
await tts.saveAudio(result.wav, 'out.wav');
Source: flutter/lib/main.dart [L112-L124]
Key Implementation Files
Each programming language SDK contains specific helper files that manage ONNX model loading, inference execution, and 44.1 kHz WAV output generation:
| Language | Primary Source File | Function |
|---|---|---|
| Python | py/helper.py |
Orchestrates ONNX Runtime Python bindings |
| Node.js | nodejs/helper.js |
Wraps ONNX model for JavaScript execution |
| Browser | web/main.js |
Manages WebGPU/Wasm inference via onnxruntime-web |
| Java | java/Helper.java |
JVM-compatible model loading |
| C++ | cpp/helper.cpp |
Native high-performance inference |
| C# | csharp/Helper.cs |
.NET 9+ integration |
| Go | go/helper.go |
CGO bindings to ONNX Runtime C |
| Swift | swift/Sources/Helper.swift |
macOS native SDK |
| iOS | ios/ExampleiOSApp/TTSService.swift |
iOS-specific service implementation |
| Rust | rust/src/helper.rs |
Memory-safe model management |
| Flutter | flutter/lib/helper.dart |
Cross-platform UI integration |
These files share identical API structures, making it straightforward to port applications between programming languages while maintaining the same inference contract.
Summary
- Supertonic supports 11 programming languages: Python, Node.js, Browser (WebGPU), Java, C++, C#, Go, Swift, iOS, Rust, and Flutter.
- Unified ONNX Runtime backend: The language-agnostic core engine ensures consistent behavior across all platforms without model modification.
- Standardized API pattern: Every SDK implements the same workflow—initialize
TTS, retrieve voice style, synthesize text, and save audio. - Production-ready implementations: Each language has dedicated helper files in the repository root (e.g.,
py/helper.py,rust/src/helper.rs) that handle ONNX inference and 44.1 kHz WAV output.
Frequently Asked Questions
Does Supertonic support mobile platforms?
Yes. Supertonic provides native support for mobile development through the iOS (ios/) and Flutter (flutter/) SDKs. The iOS implementation uses Swift with native ONNX Runtime integration, while Flutter enables cross-platform deployment to both iOS and Android from a single codebase.
Can I use the same trained model across all programming languages?
Yes. Because Supertonic uses ONNX Runtime as its inference engine, the same model files work identically across all supported programming languages without conversion or modification. This allows you to train once and deploy everywhere—from Python servers to Rust edge devices.
What is the performance difference between Python and C++ implementations?
The C++ implementation (cpp/) provides the highest performance and lowest latency because it compiles directly to native machine code with minimal overhead. The Python implementation (py/) adds interpreter overhead but offers faster development iteration. Both produce identical 44.1 kHz audio output, as they use the same underlying ONNX Runtime execution providers.
Does Supertonic require internet connectivity?
No. Supertonic is designed for on-device inference. Once you download the model assets to your local assets/ directory, all synthesis operations run locally using the ONNX Runtime engine. This applies to all supported programming languages, making it suitable for offline or privacy-sensitive applications.
Have a question about this repo?
These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:
curl -s "https://instagit.com/install.md" Maintain an open-source project? Get it listed too →