Compatible
Matches the phonemes existing Piper, Kokoro, Kitten and Matcha voices were trained on, quirks included, so they keep sounding the way they do.
A drop-in phonemiser for Piper, Kokoro and sherpa-onnx voices — English and Hindi, in Rust, Python, C and the browser. Apache-2.0.
12 µs per sentence vs 62 µs · same word error rate through Piper and Kokoro voices · no GPL anywhere
Everything on this page runs locally in WebAssembly; nothing you type leaves your device.
Matches the phonemes existing Piper, Kokoro, Kitten and Matcha voices were trained on, quirks included, so they keep sounding the way they do.
Fixes what the reference gets wrong: homographs in context, names, numbers and dates, Hindi schwa deletion and nasals. For new voices and for reading text out correctly.
The WebAssembly core is a few hundred kilobytes; each language's data is fetched the first time you use it.
npm install uccharan
import { phonemize } from "uccharan";
await phonemize("Hello, world."); // "həlˈoʊ, wˈɜːld."
await phonemize("नमस्ते", { lang: "hi", profile: "sherpa-onnx" });
pip install uccharan
import uccharan
uccharan.phonemize("Hello, world.") # 'həlˈoʊ, wˈɜːld.'
uccharan.phonemize("नमस्ते", lang="hi", profile="sherpa-onnx")
cargo add uccharan
use uccharan::{Lang, Options, Phonemizer};
let p = Phonemizer::new();
p.phonemize("Hello, world.", &Options::new(Lang::EnUs)); // "həlˈoʊ, wˈɜːld."
#include "uccharan.h"
UccharanPhonemizer *p = uccharan_new();
char *ipa = uccharan_phonemize(p, "Hello, world.", "en-us", "espeak-ipa", 0);
uccharan_string_free(ipa);
uccharan_free(p);