Montreal-Forced-Aligner icon indicating copy to clipboard operation
Montreal-Forced-Aligner copied to clipboard

[BUG]

Open Eran-BA opened this issue 1 year ago • 3 comments

Unfortantly I receive the following error, using both CMD and Colab, when I am trying to run the example from the documentation can be found here >> https://montreal-forced-aligner.readthedocs.io/en/latest/first_steps/example.html#alignment-example

" Error parsing line 0 of librispeech-lexicon.txt: Did not find any tabs, please ensure that your dictionary has tabs between words and their pronunciations. See output files at ./ljs_aligned "

And when I am look into the lexicon.txt file, I see that there aren't any tabs. only spaces. the lexicon has been download from the formal link of the documentation , https://montreal-forced-aligner.readthedocs.io/en/latest/first_steps/example.html#alignment-example

how this issue can be solved?

Thanks.

Eran-BA avatar Aug 09 '22 12:08 Eran-BA

I have the same problem as you,and I tried to replace the english_us_arpa model and english_us_arpa dict, but it will arise the NoAlignmentsError。oh my god ,i am crazy to this tools。

Leetungkwan avatar Oct 02 '22 03:10 Leetungkwan

I have the same problem.I using following code to modify librispeech-lexicon.txt and it works.

with open("librispeech-lexicon.txt",'r',encoding='utf-8') as f:
  f_new = open("new_lexicon.txt",'w',encoding="utf-8")
  lines = f.readlines()

  for line in lines:
    line_ = line.split("\t")
    if len(line_)>1:
      f_new.write(line)
    else:
      n = line.replace("  ","\t")
      if len(n.split('\t')) !=1 and n.split('\t')[0]!="":
        f_new.write(n)
  f_new.close()

jeremy110 avatar Oct 13 '22 02:10 jeremy110

I have the same problem.I using following code to modify librispeech-lexicon.txt and it works.

with open("librispeech-lexicon.txt",'r',encoding='utf-8') as f:
  f_new = open("new_lexicon.txt",'w',encoding="utf-8")
  lines = f.readlines()

  for line in lines:
    line_ = line.split("\t")
    if len(line_)>1:
      f_new.write(line)
    else:
      n = line.replace("  ","\t")
      if len(n.split('\t')) !=1 and n.split('\t')[0]!="":
        f_new.write(n)
  f_new.close()

i change the dict,i think “lexcion.txt” can not suit the new version(2.0.6). you can dowanload the englis_us_arpa.dict

Leetungkwan avatar Oct 13 '22 03:10 Leetungkwan