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

Updating lhotse caused some errors when reading data #1227

Open
lucy9527 opened this issue Dec 5, 2023 · 2 comments
Open

Updating lhotse caused some errors when reading data #1227

lucy9527 opened this issue Dec 5, 2023 · 2 comments

Comments

@lucy9527
Copy link

lucy9527 commented Dec 5, 2023

error

    data = fetcher.fetch(index)
  File "/anaconda3/envs/k2/lib/python3.8/site-packages/torch/utils/data/_utils/fetch.py", line 53, in fetch
    data = self.dataset[possibly_batched_index]
  File "/anaconda3/envs/k2/lib/python3.8/site-packages/lhotse/dataset/speech_recognition.py", line 116, in __getitem__
    input_tpl = self.input_strategy(cuts)
  File "/anaconda3/envs/k2/lib/python3.8/site-packages/lhotse/dataset/input_strategies.py", line 120, in __call__
    return collate_features(
  File "/anaconda3/envs/k2/lib/python3.8/site-packages/lhotse/dataset/collation.py", line 129, in collate_features
    assert all(cut.has_features for cut in cuts)
AssertionError

My setting

lhotse 1.16.0

{"id": "1789427dfeafd27d67b8c90e64114779-20064", "start": 0, "duration": 3.26, "channel": 0, "supervisions": [{"id": "1789427dfeafd27d67b8c90e64114779", "recording_id": "1789427dfeafd27d67b8c90e64114779", "start": 0.0, "duration": 3.26, "channel": 0, "text": "你是
不是 要把 李 璋 治 捉 去", "language": "Chinese", "speaker": "1789427dfeafd27d67b8c90e64114779"}], "recording": {"id": "1789427dfeafd27d67b8c90e64114779", "sources": [{"type": "file", "channels": [0], "source": "/wav/1789427dfeafd27d67b8c90e64114779.wav"}], "sampling_rate": 16000, "num_samples": 52160, "duration": 3.26, "channel_ids": [0]}, "type": "MonoCut"}
@pzelasko
Copy link
Collaborator

pzelasko commented Dec 5, 2023

You’re trying to read precomputed features from cuts that don’t have them. Are you sure you got the right cut set?

@lucy9527
Copy link
Author

lucy9527 commented Dec 6, 2023

You’re trying to read precomputed features from cuts that don’t have them. Are you sure you got the right cut set?

Yes, the default value for "--input-strategy" is "PrecomputedFeatures". Changing it to "AudioSamples" resolved the issue.

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

No branches or pull requests

2 participants