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.

Accuracy

2.1% PER

G2P, English holdout set.

Latency

1.05 ms

Per second of audio. Phoneme ASR, CPU.

Cheap. Fast. Accurate. Pick three.

What runs today, what's coming next, and the languages in the box.

Tasks

Text → IPA

Available

Audio → IPA

Available

IPA → Text

Coming soon

Audio → Text

(Speech recognition)

Coming soon

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 load the same ONNX assets 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.