ntts_dart 0.0.0 ntts_dart: ^0.0.0 copied to clipboard
Neural Text To Speech dart cross platform support server side and client side without request internet data and work on cpu.
Neural Text To Speech #
Neural Text To Speech Library untuk menghasilkan suara realistis seperti natural di bahasa dart, neural text to speech ini berjalan tanpa perlu koneksi internet dan hanya membutuhkan cpu saja
Demo #
Resources #
No | Name |
---|---|
1 | MODEL TTS ENGLISH |
Development #
git clone https://github.com/azkadev/ntts_dart.git
cd ntts_dart
Dependencies #
sudo apt-get install espeak-ng
Compile Library #
cd native_lib
mkdir -p build
cd build
cmake -DCMAKE_BUILD_TYPE=Release ..
cmake --build .
Install #
dart pub add ntts_dart
Import Library #
import 'package:ntts_dart/ntts_dart.dart';
Quickstart #
Sebelum di run pastikan kamu sudah mengcompile library dan menyiapkan model dahulu
import 'dart:io';
import 'dart:isolate';
import 'package:ntts_dart/ntts_dart.dart';
void main(List<String> arguments) async {
Args args = Args(arguments);
File file = File("data.wav");
Ntts lib = Ntts(
pathLib: "libntts.so",
);
var result = lib.requestRaw(
data: {
"@type": "createVoice",
"text": "Hello World Text To Speech",
"exec_path": Directory.current.path,
"model_path": File("models/en-us-libritts-high.onnx").path,
"output_file": file.path,
"speaker_id": 10,
},
);
}