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
Audio → IPA
IPA → Text
Audio → Text
(Speech recognition)
Text → Embeddings
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 referenceTry it out
Try sample inputs or type your own text.
—
Built on the same model: Make AI say your name correctly, a transcript fixer that matches names by pronunciation.
Blog
hama v1.3.13: Faster pronunciation matching
How our name correction demo works
G2P phonemes, alignment-sliced prefilters, bounded edit distance, and weighted-interval patch selection. All in your browser.
hama v1.3.12: Character-span matching by default
hama v1.3.11: Transcript correction
hama v1.3.10: ASR asset refresh
Documentation
Getting started
Introduction
Overview, guiding principles, and supported languages.
Getting started
Installation
Set up Python and TypeScript runtimes for development or deployment.
Reference
APIs
Detailed reference for model classes and helper functions.
Reference
IPA Reference
Practical IPA symbol table and interpretation guide for hama outputs.
Sponsor the models your browser just ran.
Sponsorship pays for training compute, model maintenance, and documentation.