lir: a word of 1,667 letters or more raises a raw onnxruntime error
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 80/100
Research direction
Read scriptconv/phonemizers/lir.py around lines 119-120, where ids is built by repeating each character char_repeats times and handed to self.session.run. First run the reproduction snippet in the issue to see the raw onnxruntime Fail, then check char_repeats and the model's 5,000-id input bound to confirm the 1,666-letter cutoff. Done means an over-long word raises a scriptconv error that names the limit (or is split into readable parts) instead of leaking the onnxruntime class, plus a test alongside the existing phonemizer tests.
Written by the indexing model from the issue text.
Description
🤖 Auto-generated by Claude Opus 5.5 (claude-opus-5-5) via Claude Code — NOT human-reviewed. Verify before acting.
Verified against source: the outputs below come from a run on scriptconv origin/dev 03b4c08 with the
lirextra and the pinned model files.
Observed
The Kolokwa backend (KolokwaPhonemizer, language lir) raises a raw onnxruntime error for a word of 1,667 letters or more. A word of 1,666 letters gives phonemes.
| Word length | Result |
|---|---|
| 1,000 | phonemes (227 characters) |
| 1,666 | phonemes (300 characters) |
| 1,667 | onnxruntime.capi.onnxruntime_pybind11_state.Fail: Non-zero status code returned while running Gather node. Name:'node_embedding' ... Shape mismatch attempting to re-use buffer. {5000,1,512} != {6002,1,512} |
| 2,000 | the same Fail |
The review of #376 found the same failure in the upstream kolokwa-g2p code. This run did not check upstream. The error type is an onnxruntime class, so a caller cannot catch it as a scriptconv error.
Expected
A word that is longer than the model input gives a scriptconv error that names the limit, or the backend cuts the word into parts that the model reads. The model reads at most 5,000 ids. Each letter gives three ids (char_repeats is 3) and the bounds give two, so the limit is 1,666 letters, and the backend can check it before the call.
Reproduce
from scriptconv.phonemizers.lir import KolokwaPhonemizer
p = KolokwaPhonemizer()
p.phonemize_string("ba" * 833 + "b", "lir")
Where
scriptconv/phonemizers/lir.py: lines 119 and 120 build ids from each letter repeated char_repeats times and pass them to self.session.run with no length check.
- Dominant language
- Python
- Stars
- 4
- Forks
- 1
- Avg merge
- 8h 57m
- Merged PRs (30d)
- 118
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from TigreGotico/scriptconv
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
TigreGotico/scriptconv#412 ·
Maintainers usually reply within 1 day
-
docs: the ByT5 docstring says it downloads, and the _stress docstring says stressonnx is not on PyPIOpen
Difficulty 1/5 Under an hour Newbie friendliness 88/100
TigreGotico/scriptconv#411 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
TigreGotico/scriptconv#410 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
TigreGotico/scriptconv#409 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
TigreGotico/scriptconv#408 ·
Maintainers usually reply within 1 day
All issues in TigreGotico/scriptconv
Similar issues
-
eegprep-lean: set channel types from the Zarr group's channel_typePossibly taken @claude claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
sccn/eegprep#668 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
blacklanternsecurity/bbot#3679 ·
Maintainers usually reply within 2 days
-
Link Checker ReportOpenBot Type: Bug Type: Documentation
Difficulty 1/5 Under an hour Newbie friendliness 85/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
speakeasy-api/speakeasy#2159 ·
Maintainers usually reply within 1 day