There's a pronunciation model in this tab.

On-device language processing in Python, Node, and the browser

uv pip install hama
from hama import G2PModel

model = G2PModel()
result = model.predict(
    "I saw her duck.",
    preserve_literals="punct",
)
print(result.ipa)
print(result.display_ipa)

Targets

Python · TypeScript

Browser and server runtimes.

Engine

~39 KB

Self-contained WASM. No onnxruntime.

Latency

~24× real-time

Phoneme ASR on a laptop CPU.

Cheap. Fast. Accurate. Pick three.

Twelve languages, zero servers.

Tasks

Text → IPA

Available

Audio → IPA

Available

IPA → Text

Available

Audio → Text

(Speech recognition)

Available

Text → Embeddings

Coming soon

Features

Character-level alignments

Every output phoneme maps back to the input characters that produced it.

Code-mixed input

Sentences that mix languages and scripts convert in a single call.

One model set, three runtimes

Python, Node, and the browser run the same hand-written Zig engine and return the same outputs.

Apache 2.0

Permissive license for commercial and embedded use.

Supported languages

IPA reference
English French German Italian Japanese Korean Portuguese Spanish Dutch Thai (Central) Chinese (Simplified) Chinese (Traditional)

Try it out

Try sample inputs or type your own text.

Loading model weights in the browser… (Inference runs locally.)
Display IPA

Alignments

Built on the same model: Make AI say your name correctly, a transcript fixer that matches names by pronunciation.

Sponsor the models your browser just ran.

Sponsorship pays for training compute, model maintenance, and documentation.