fairseq icon indicating copy to clipboard operation
fairseq copied to clipboard

MMS - Incorrect vocab.txt for Korean TTS. Results in nothing getting past the filter

Open ogkalu2 opened this issue 2 years ago • 5 comments

Korean TTS downloaded the model with - wget https://dl.fbaipublicfiles.com/mms/tts/kor.tar.gz

after running infer.py, there is no text after the line - text after filtering OOV:

Checked the vocab.txt and it's incorrect for Korean. Shows English letters. downloaded again to be sure but still wrong.

ogkalu2 avatar May 23 '23 01:05 ogkalu2

We use uroman encoding for Korean TTS and thus inputting raw Korean characters will raise OOV. Will push a fix for uroman conversion soon.

chevalierNoir avatar May 23 '23 02:05 chevalierNoir

@chevalierNoir Thanks. any plans on releasing code to finetune the TTS models ?

ogkalu2 avatar May 23 '23 04:05 ogkalu2

@ogkalu2 the issue should be fixed now. Please try again. For training, we use the original VITS code.

chevalierNoir avatar May 24 '23 04:05 chevalierNoir

@ogkalu2 the issue should be fixed now. Please try again. For training, we use the original VITS code.

oov filtering turkish language letter like "Ö" "Ç" "İ" "Ğ" image image

serkandyck avatar May 24 '23 14:05 serkandyck

@serkandyck this is possibly an encoding problem of your input text. I tried this sentence and it seems working fine. Raw: Çalışkan İpek, öğleden sonra ödevini özenle tamamladı.
Filtered: çalışkan i̇pek öğleden sonra ödevini özenle tamamladı

This is the command:

PYTHONPATH=$PYTHONPATH:/path/to/vits python examples/mms/tts/infer.py \
--model-dir /path/to/tur/ --wav ./tur.wav \ 
--txt "Çalışkan İpek, öğleden sonra ödevini özenle tamamladı"

chevalierNoir avatar May 24 '23 16:05 chevalierNoir

@chevalierNoir It works now. Thank you

ogkalu2 avatar May 24 '23 21:05 ogkalu2

@serkandyck this is possibly an encoding problem of your input text. I tried this sentence and it seems working fine. Raw: Çalışkan İpek, öğleden sonra ödevini özenle tamamladı. Filtered: çalışkan i̇pek öğleden sonra ödevini özenle tamamladı

This is the command:

PYTHONPATH=$PYTHONPATH:/path/to/vits python examples/mms/tts/infer.py \
--model-dir /path/to/tur/ --wav ./tur.wav \ 
--txt "Çalışkan İpek, öğleden sonra ödevini özenle tamamladı"

I looked into the problem a bit and saw that it was not reading the vocab file as UTF-8, I also sent the problem solution as a pull request. https://github.com/facebookresearch/fairseq/pull/5148#issue-1724265247

https://github.com/facebookresearch/fairseq/blob/25c20e6a5e781e4ef05e23642f21c091ba64872e/examples/mms/tts/infer.py#L27

image

serkandyck avatar May 25 '23 01:05 serkandyck