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

https://user-images.githubusercontent.com/82513502/232475337-c02e24fd-52a7-4a4a-933c-b8f69aeedb5b.mp4


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,
    },
  );
  
}

Refferensi

  1. Piper
  2. Mimic Recording Studio
  3. Espeak
  4. onnxruntime