Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ali_meeting] Fix some path errors for ali_meeting.py #705

Conversation

luomingshuang
Copy link
Contributor

@luomingshuang luomingshuang commented May 9, 2022

In the original ali_meeting.py, the line 99-103 is

            corpus_dir = (
                corpus_dir / f"{part}_Ali"
                if (corpus_dir / f"{part}_Ali").is_dir()
                else corpus_dir
            )

After the loop when the part is "Eval", the corpus_dir becomes corpus_dir / "Eval_Ali". And then, when comes to the loop that the part is "Test", the corpus_dir will be corpus_dir / "Eval_Ali" / "Test_Ali". However, corpus_dir / "Eval_Ali" / "Test_Ali" doesn't exist. It's wrong. So I change the codes from 99 to 105 line as follows:

        corpus_dir_split = corpus_dir
        if part == "Eval" or part == "Test":
            corpus_dir_split = (
                corpus_dir / f"{part}_Ali"
                if (corpus_dir / f"{part}_Ali").is_dir()
                else corpus_dir
            )
        wav_paths = corpus_dir_split / f"{part}_Ali_{mic}" / "audio_dir"
        text_paths = corpus_dir_split / f"{part}_Ali_{mic}" / "textgrid_dir"

If not do the above changes, there will be an error when generating the test manifest as follows (because the corpur_dir for test doesn't exist.):
image

@pzelasko pzelasko added this to the v1.2 milestone May 9, 2022
@pzelasko pzelasko merged commit c624009 into lhotse-speech:master May 9, 2022
@pzelasko
Copy link
Collaborator

pzelasko commented May 9, 2022

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants