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.
- (Set up Flutter)
- Download the onnx models from Google drive. By default,
mixer128.onnx
andvocos22.onnx
are activated. - Put the onnx files into the
assets/models
folder. - (Modify the following lines in
pubspec.yaml
andmain.dart
to use other models thanmixer128.onnx
andvocos22.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",
);
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 |
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.