Installation

hama publishes two packages: hama (Python) and hama-js (TypeScript). Both ship with embedded .hama weight packages, so no follow-up downloads are required.

Subpath exports: hama-js/g2p, hama-js/asr, hama-js/p2g, hama-js/g2p/browser, hama-js/asr/browser, hama-js/p2g/browser, hama-js/browser, hama-js/jamo, and hama-js/tokenizer.

Install from a package registry

uv pip install hama
# or
pip install hama

Verify the Python install with python -c “from hama import G2PModel; print(G2PModel().predict(‘안녕하세요’).ipa)”. For Node/Bun, run a short script that imports G2PNodeModel from hama-js/g2p, ASRNodeModel from hama-js/asr, or P2GNodeModel from hama-js/p2g. For browser setups, import G2PBrowserModel, ASRBrowserModel, or P2GBrowserModel from their published browser exports.

For live microphone ASR examples in Python, install the optional extra with uv pip install ‘hama[live]’.

Local development

git clone https://github.com/hamanlp/hama.git
cd hama/python
uv sync --extra test
uv run pytest

Notes

Python 3.9+ and Node 18+ (or Bun 1.1+) are recommended. Python installs include the model weights (and the native engine) inside the wheel; TypeScript installs ship the same .hama weights plus hama.wasm in dist/.

G2P uses split weights by default (encoder.hama + decoder_step.hama), run by a self-contained engine — no onnxruntime.

Versioning

hama and hama-js are versioned and released together. Each coordinated release should publish both packages and tag the corresponding shared asset bundle commit.