Download the model checkpoint and G2P model on Hugging Face and place them in the current directory.
import { tts } from "./model.js";
import fs from "node:fs/promises";
const wavBuffer = await tts("ស្រុកខ្មែរ");
await fs.writeFile("audio.wav", wavBuffer);npm i
npm start ស្រុកខ្មែរ test.wavRunning a web service to serve text-to-speech request
npm run serveVisit: http://localhost:3000/កិច្ចការ
docker build -t klea .
# run webservice
docker run --rm -it -p 3000:3000 klea