lingjzhu / charsiu

Charsiu: A neural phonetic aligner.
MIT License
281 stars 35 forks source link

Unable to run Chinese forced alignment model #28

Open Frankalexej opened 2 years ago

Frankalexej commented 2 years ago

May I possibly ask why there is always index error when I run the Chinese forced alignment model? The snapshot is as follows. Thank you very much! image

lingjzhu commented 2 years ago

Does this code example work? charsiu = charsiu_forced_aligner(aligner='charsiu/zh_w2v2_tiny_fc_10ms',lang='zh') charsiu.align(audio='./local/SSB00050015_16k.wav',text='经广州日报报道后成为了社会热点。')

Are you using a Chinese model and specify lang='zh'? Could you show the full code and, if possible, share the audio?

Frankalexej commented 2 years ago

Thank you so much for your help! I compared the code you provided here and the original code and found that it was because I copied the model code from the tutorial 1.1, where the forced alignment model for Chinese was given the English model path. Probably that's a typo? I changed to this code charsiu = charsiu_forced_aligner(aligner='charsiu/zh_w2v2_tiny_fc_10ms',lang='zh') and it worked. Thank you again! image

lingjzhu commented 2 years ago

Glad to hear that it worked out!

congzhang365 commented 2 years ago

Thanks for spotting the typo and letting us know! I've updated the tutorial.