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

add user defined kaldi feature type #1101

Merged
merged 8 commits into from
Jul 21, 2023

Conversation

ZihanLiao
Copy link
Contributor

Add user-defined kaldi feature type, by default is 'kaldi-fbank'

pzelasko
pzelasko previously approved these changes Jul 18, 2023
Copy link
Collaborator

@pzelasko pzelasko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, LGTM!

@pzelasko pzelasko added this to the v1.16 milestone Jul 18, 2023
@pzelasko pzelasko enabled auto-merge (squash) July 18, 2023 03:37
@pzelasko pzelasko linked an issue Jul 18, 2023 that may be closed by this pull request
@ZihanLiao ZihanLiao closed this Jul 18, 2023
auto-merge was automatically disabled July 18, 2023 03:51

Pull request was closed

@ZihanLiao ZihanLiao reopened this Jul 18, 2023
@pzelasko pzelasko enabled auto-merge (squash) July 18, 2023 03:54
@ZihanLiao
Copy link
Contributor Author

@pzelasko
Copy link
Collaborator

You’ll need to update the jsonl files used in tests to have the new feature type.

auto-merge was automatically disabled July 19, 2023 01:41

Head branch was pushed to by a user without write access

@ZihanLiao
Copy link
Contributor Author

You’ll need to update the jsonl files used in tests to have the new feature type.

Changed the type in features.jsonl.gz from kaldi_native_io to kaldi-fbank

lhotse/kaldi.py Outdated
@@ -80,6 +80,7 @@ def load_kaldi_data_dir(
map_string_to_underscores: Optional[str] = None,
use_reco2dur: bool = True,
num_jobs: int = 1,
feature_type: str = 'kaldi-fbank'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You also need to update

@click.option(
"-j",
"--num-jobs",
default=1,
type=int,
help="Number of jobs for computing recording durations.",
)

You can add another option for feature_type.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You forgot to update the subsequent python function.

You have to add it as an argument for the function that follows.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for my carelessness, see if any further modifications need to be done.

pzelasko
pzelasko previously approved these changes Jul 21, 2023
Copy link
Collaborator

@pzelasko pzelasko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, LGTM! Please just fix the remaining style checks.

@pzelasko pzelasko enabled auto-merge (squash) July 21, 2023 00:21
auto-merge was automatically disabled July 21, 2023 01:30

Head branch was pushed to by a user without write access

@pzelasko pzelasko enabled auto-merge (squash) July 21, 2023 12:53
@pzelasko pzelasko merged commit d5461ff into lhotse-speech:master Jul 21, 2023
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.

KeyError when loading kaldi feature
3 participants