Installation Guide

Getting Started

Supertonic TTS supports multiple programming languages and platforms. This guide will help you set up the system for your preferred environment.

First, clone the repository to get started:

git clone https://github.com/supertone-inc/supertonic.git cd supertonic

Prerequisites

Before running the examples, you need to download the ONNX models and preset voices. The Hugging Face repository uses Git LFS for large model files, so ensure Git LFS is installed and initialized.

Install Git LFS:

  • macOS: brew install git-lfs && git lfs install
  • Other platforms: Visit https://git-lfs.com for installers

Download the models and assets:

git clone https://huggingface.co/Supertone/supertonic assets

Python Installation

For Python implementations using ONNX Runtime:

cd py uv sync uv run example_onnx.py

The Python implementation uses ONNX Runtime for cross-platform inference. It supports CPU-optimized processing and can work with GPU acceleration in supported environments.

Node.js Installation

For server-side JavaScript applications:

cd nodejs npm install npm start

The Node.js implementation enables text-to-speech generation in server environments using JavaScript.

Browser Installation

For web-based applications using WebGPU and WebAssembly:

cd web npm install npm run dev

The browser implementation uses onnxruntime-web for client-side inference. It supports WebGPU acceleration when available, providing fast processing directly in web browsers.

Java Installation

For JVM-based applications:

cd java mvn clean install mvn exec:java

The Java implementation works across platforms that support the Java Virtual Machine.

C++ Installation

For high-performance C++ applications:

cd cpp mkdir build && cd build cmake .. && cmake --build . --config Release ./example_onnx

The C++ implementation provides native performance for applications that require maximum speed.

C# Installation

For .NET ecosystem applications:

cd csharp dotnet restore dotnet run

The C# implementation enables integration with .NET applications and frameworks.

Go Installation

For Go applications:

cd go go mod download go run example_onnx.go helper.go

The Go implementation provides another option for server-side text-to-speech generation.

Swift Installation

For macOS applications:

cd swift swift build -c release .build/release/example_onnx

The Swift implementation enables native macOS application development with Supertonic TTS.

Rust Installation

For memory-safe systems programming:

cd rust cargo build --release ./target/release/example_onnx

The Rust implementation provides memory safety guarantees along with high performance.

iOS Installation

For native iOS applications:

cd ios/ExampleiOSApp xcodegen generate open ExampleiOSApp.xcodeproj

In Xcode, configure signing by selecting your Team under Targets → ExampleiOSApp → Signing. Choose your iPhone as the run destination, then build and run the application.

Flutter Installation

For cross-platform mobile and desktop applications:

The Flutter SDK supports macOS compatibility and enables development of applications that work across iOS, Android, and desktop platforms. Follow the Flutter-specific documentation in the flutter directory for detailed setup instructions.

Technical Details

Supertonic TTS uses ONNX Runtime for cross-platform inference. The runtime is optimized for CPU processing, and GPU mode support may vary by platform. Browser implementations use onnxruntime-web for client-side processing.

The system supports batch inference for improved throughput when generating multiple audio samples. Audio output is provided as 16-bit WAV files, which are compatible with most audio processing tools and media players.

Each language implementation includes example code demonstrating basic usage. Refer to the README.md file in each language directory for detailed usage instructions and additional configuration options.

Troubleshooting

If you encounter issues during installation:

  • Ensure Git LFS is properly installed and initialized before cloning the model repository
  • Verify that all dependencies are installed correctly for your chosen platform
  • Check that the assets directory contains the downloaded models and voices
  • Review platform-specific requirements in each language directory's README
  • For browser implementations, ensure WebGPU support is available in your browser

For additional help and detailed documentation, refer to the README files in each language directory or consult the main repository documentation.