You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Phonemizer reports "IndexError: list assignment index out of range" "when using "--words-mistach remove" to generate IPAs
Phonemizer version
phonemizer-3.3.0
available backends: espeak-ng-1.51, segments-2.2.1
uninstalled backends: espeak-mbrola, festival
System
WSL Debian 12 guest on Windows 10 host
Python 3.11.2
To reproduce
user@DESKTOP:~/phonemizer$ cat ~/ipa/ch2.txt | phonemize -q -o ~/ipa/phones.txt -l en-gb-x-rp -b espeak --preserve-punctuation --strip --words-mismatch remove
Traceback (most recent call last):
File "/home/user/.local/bin/phonemize", line 8, in <module>
sys.exit(main())
^^^^^^
File "/home/user/.local/pipx/venvs/phonemizer/lib/python3.11/site-packages/phonemizer/main.py", line 48, in __call__
self.function()
File "/home/user/.local/pipx/venvs/phonemizer/lib/python3.11/site-packages/phonemizer/main.py", line 400, in main
out = phonemize(
^^^^^^^^^^
File "/home/user/.local/pipx/venvs/phonemizer/lib/python3.11/site-packages/phonemizer/phonemize.py", line 227, in phonemize
return _phonemize(phonemizer, text, separator, strip, njobs, prepend_text, preserve_empty_lines)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/user/.local/pipx/venvs/phonemizer/lib/python3.11/site-packages/phonemizer/phonemize.py", line 310, in _phonemize
phonemized = backend.phonemize(
^^^^^^^^^^^^^^^^^^
File "/home/user/.local/pipx/venvs/phonemizer/lib/python3.11/site-packages/phonemizer/backend/base.py", line 207, in phonemize
return self._phonemize_postprocess(phonemized, punctuation_marks, separator, strip)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/user/.local/pipx/venvs/phonemizer/lib/python3.11/site-packages/phonemizer/backend/espeak/espeak.py", line 157, in _phonemize_postprocess
return self._words_mismatch.process(phonemized)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/user/.local/pipx/venvs/phonemizer/lib/python3.11/site-packages/phonemizer/backend/espeak/words_mismatch.py", line 151, in process
text[index] = ''
~~~~^^^^^^^
IndexError: list assignment index out of range
Expected behavior
No errors on running the commands, and that the merged words are separated in the output as what the --words-mismatch option is supposed to do
The text was updated successfully, but these errors were encountered:
Describe the bug
Phonemizer reports "IndexError: list assignment index out of range" "when using "--words-mistach remove" to generate IPAs
Phonemizer version
System
WSL Debian 12 guest on Windows 10 host
Python 3.11.2
To reproduce
Expected behavior
No errors on running the commands, and that the merged words are separated in the output as what the --words-mismatch option is supposed to do
The text was updated successfully, but these errors were encountered: