Skip to content

v0.1.0

Latest

Choose a tag to compare

@lenzo-ka lenzo-ka released this 08 Jul 20:06

Initial public release of phonebox — fast, lightweight grapheme-to-phoneme (G2P) conversion using decision trees.

Highlights

  • 1:1 letter→phone decision-tree (CART) model with EM alignment
  • Joint n:m multigram G2P with n-gram Viterbi decoding and n-best output
  • Hybrid mode: exception-dictionary lookup with tree fallback (memorize + generalize)
  • CLI: train, pronounce, align, vectorize, dict, and eval subcommands
  • Locale-aware normalization via ICU (bundled through icukit, no system ICU build required)

Measured accuracy (CMUdict, 1:1 decision tree)

  • With stress: PER 12.96% / WER 53.8% / pos-acc 81.8%
  • Stress stripped: PER 11.36% / WER 44.9% / pos-acc 81.8%

Neural sequence models achieve lower error; phonebox trades some accuracy for speed, a tiny footprint, full determinism, and inspectable trees. See docs/G2P_EVAL.md for the metric definitions and reproduction command.

Requirements

  • Python >= 3.11
  • cartlet >= 0.5.0, icukit >= 0.1.2