Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failure with preserve_punctuation=True #40

Closed
CorentinJ opened this issue Feb 19, 2020 · 1 comment
Closed

Failure with preserve_punctuation=True #40

CorentinJ opened this issue Feb 19, 2020 · 1 comment

Comments

@CorentinJ
Copy link

from phonemizer.phonemize import phonemize
phonemize("hi; ho,\"", backend="espeak", preserve_punctuation=True, punctuation_marks=".!;:,?")
Traceback (most recent call last):
  File "E:\Python37\lib\site-packages\IPython\core\interactiveshell.py", line 3291, in run_code
    exec(code_obj, self.user_global_ns, self.user_ns)
  File "<ipython-input-26-f9fe7d23f4b3>", line 1, in <module>
    phonemize("hi; ho,\"", backend="espeak", preserve_punctuation=True, punctuation_marks=".!;:,?")
  File "E:\Python37\lib\site-packages\phonemizer\phonemize.py", line 172, in phonemize
    text, separator=separator, strip=strip, njobs=njobs)
  File "E:\Python37\lib\site-packages\phonemizer\backend\base.py", line 126, in phonemize
    text = self._punctuator.restore(text, punctuation_marks)
  File "E:\Python37\lib\site-packages\phonemizer\punctuation.py", line 146, in restore
    return cls._restore_aux(str2list(text), marks, 0)
  File "E:\Python37\lib\site-packages\phonemizer\punctuation.py", line 166, in _restore_aux
    [text[0] + m.mark + text[1]] + text[2:], marks[1:], n)
  File "E:\Python37\lib\site-packages\phonemizer\punctuation.py", line 166, in _restore_aux
    [text[0] + m.mark + text[1]] + text[2:], marks[1:], n)
IndexError: list index out of range

This is after 83e8e62.

mmmaat added a commit that referenced this issue Feb 19, 2020
@mmmaat
Copy link
Collaborator

mmmaat commented Feb 19, 2020

thanks for reporting, normally this is fixed in b08713e.

@mmmaat mmmaat closed this as completed Feb 19, 2020
CorentinJ added a commit to resemble-ai/phonemizer that referenced this issue Feb 19, 2020
* fixed bootphon#26

* phonemizer-2.0.1

* phonemizer-2.0.1

* phonemizer-2.0.1

* CI upload to pypi

* fixed bootphon#31

* bugfix in parsing espeak-ng version

* bugfix in parsing espeak-ng version

* update copyright

* WIP

* Allow sampa for espeak

* option to specify an alternative espeak/espeak-ng binary

* deploy only on new tags

* WIP

* Add replacing content

* add PyYaml requirement

* add test and replacement as str

* WIP

* merge PR bootphon#34 from @Rachine

* can specify an alternative festival executable

* bugfix in setup.py

* fixed sampa mapping for French

* corrected ChangeLog

* CI on multiple versions of espeak

* CI on multiple versions of espeak

* minor improvments

* punctuation processing implemented

* release phonemizer-2.1

* updated README

* updated CHANGELOG

* fixing gitlab CI

* fixing gitlab CI

* fixed issue bootphon#39

* pep8

* fixed issue bootphon#40

* fixed a test on espeak>=1.50

Co-authored-by: Mathieu Bernard <mathieu.a.bernard@inria.fr>
Co-authored-by: Rachid Riad <riadrachid3@gmail.com>
ZohaibAhmed pushed a commit to resemble-ai/phonemizer that referenced this issue Feb 17, 2021
* fixed bootphon#26

* phonemizer-2.0.1

* phonemizer-2.0.1

* phonemizer-2.0.1

* CI upload to pypi

* fixed bootphon#31

* bugfix in parsing espeak-ng version

* bugfix in parsing espeak-ng version

* update copyright

* WIP

* Allow sampa for espeak

* option to specify an alternative espeak/espeak-ng binary

* deploy only on new tags

* WIP

* Add replacing content

* add PyYaml requirement

* add test and replacement as str

* WIP

* merge PR bootphon#34 from @Rachine

* can specify an alternative festival executable

* bugfix in setup.py

* fixed sampa mapping for French

* corrected ChangeLog

* CI on multiple versions of espeak

* CI on multiple versions of espeak

* minor improvments

* punctuation processing implemented

* release phonemizer-2.1

* updated README

* updated CHANGELOG

* fixing gitlab CI

* fixing gitlab CI

* fixed issue bootphon#39

* pep8

* fixed issue bootphon#40

* fixed a test on espeak>=1.50

Co-authored-by: Mathieu Bernard <mathieu.a.bernard@inria.fr>
Co-authored-by: Rachid Riad <riadrachid3@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants