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
@classmethoddef_count_words(cls, text, wordsep=None):
"""Return the number of words contained in each line of `text`"""return [
len([wforwinline.strip().split(wordsep) ifw])
forlineintext]
defcount_phonemized(self, text, wordsep=None):
"""Stores the number of words in each output line"""self._count_phn=self._count_words(text, wordsep)
Note: this still raises warnings when unexpected line splits occur, such as caps in the middle GameStop or nonword chars before punctuation he said--, no. But it should suffice for most cases and the input text should be normalized properly.
The text was updated successfully, but these errors were encountered:
It's quite common to use spaces to separate the phonemes for speech synthesis.
But this leads to word mismatch problems because
count_phonemized
splits on whitespace.It seems to be a common issue, e.g. #154 and lifeiteng/vall-e#50
I have fixed this (per below) but let me know if you need a PR for it.
Fix in
words_mismatch.py
Fix in
espeak.py
:Fix in
base.py
Note: this still raises warnings when unexpected line splits occur, such as caps in the middle
GameStop
or nonword chars before punctuationhe said--, no
. But it should suffice for most cases and the input text should be normalized properly.The text was updated successfully, but these errors were encountered: