Skip to content

nipponjo/tts-arabic-flutter

Repository files navigation

tts_arabic_flutter

A basic Flutter demo app for Arabic TTS with models from tts_arabic / tts-arabic-pytorch.

The app runs ONNX models using the package onnxruntime_flutter.

Setup

  1. (Set up Flutter)
  2. Download the onnx models from Google drive. By default, mixer128.onnx and vocos22.onnx are activated.
  3. Put the onnx files into the assets/models folder.
  4. (Modify the following lines in pubspec.yaml and main.dart to use other models than mixer128.onnx and vocos22.onnx)

in pubspec.yaml

assets:
  - assets/models/mixer128.onnx
  - assets/models/vocos22.onnx

in main.dart

_ttsModel!.initSessions(
  modelPath: "assets/models/mixer128.onnx",
  vocoderPath: "assets/models/vocos22.onnx",
);

Supported models:

Model Model ID Type #params File Paper
FastPitch fastpitch Text->Mel 46.3M fp_ms.onnx arxiv
MixerTTS mixer128 Text->Mel 2.9M mixer128.onnx arxiv
MixerTTS mixer80 Text->Mel 1.5M mixer80.onnx arxiv
Vocos vocos Vocoder 13.4M vocos22.onnx arxiv

Preview:

Getting Started with Flutter

A few resources to get you started if this is your first Flutter project:

For help getting started with Flutter development, view the online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.