- Run the g2pW model through
piper.g2pw_onnxinstead ofg2pw.api, droppingtorch(~750 MB installed) andrequestsfrom thezhextrag2pw.apiimports torch only to build padded tensors and iterate batches; the model itself already ran under onnxruntime- Also 1.5-2x faster, since it no longer forks DataLoader worker processes on every call
g2pWis still required, for its pinyin/bopomofo lookup tables