Skip to content

Skip unknown phonemes in g2p processing#50

Open
madest92 wants to merge 1 commit into
alphacep:masterfrom
madest92:spec_symbols
Open

Skip unknown phonemes in g2p processing#50
madest92 wants to merge 1 commit into
alphacep:masterfrom
madest92:spec_symbols

Conversation

@madest92

Copy link
Copy Markdown

Fix KeyError when unknown phonemes are encountered in g2p methods

# vosk-tts -n vosk-model-tts-ru-0.7-multi -s 3 -o out_vost.wav -i "Found special symbol @"
Loading model from /root/.cache/vosk/vosk-model-tts-ru-0.7-multi/model.onnx

Traceback (most recent call last):
.....
  File "/data/.venv/lib/python3.11/site-packages/vosk_tts/synth.py", line 235, in g2p_noembed
    phoneme_ids.extend(phoneme_id_map[phonemes[i]])
                       ~~~~~~~~~~~~~~^^^^^^^^^^^^^
KeyError: '@'

The problem is observed in all models.

@madest92

Copy link
Copy Markdown
Author

@nshmyrev hi.

Can you take a look?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant