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

load ark directly in KaldiReader #862

Merged
merged 3 commits into from
Oct 26, 2022

Conversation

csukuangfj
Copy link
Contributor

No description provided.

@@ -582,8 +582,6 @@ class FeatureSet(Serializable, AlgorithmMixin):

def __init__(self, features: List[Features] = None) -> None:
self.features = ifnone(features, [])
if isinstance(self.features, list):
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I remove this sort since it causes errors when creating cutset using lhotse cut simple with features, supervisions, and recordings imported from kaldi.

self.storage = kaldi_native_io.RandomAccessFloatMatrixReader(
f"scp:{self.storage_path}"
)
if storage_path.endswith(".scp"):
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is for backward compatibility.

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.

Looks good to me! @jtrmal these changes are probably covered by the tests you wrote, right?

@pzelasko pzelasko merged commit 2f9b083 into lhotse-speech:master Oct 26, 2022
@csukuangfj csukuangfj deleted the fix-kaldi-native-io branch October 26, 2022 03:39
@jtrmal
Copy link
Collaborator

jtrmal commented Oct 27, 2022 via email

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.

3 participants