lhotse-speech / lhotse

Tools for handling speech data in machine learning projects.
https://lhotse.readthedocs.io/en/latest/
Apache License 2.0
901 stars 204 forks source link

Multiple feature extractors in a single Cut #1350

Open njellinas opened 3 weeks ago

njellinas commented 3 weeks ago

Is it possible to have multiple feature extractors for a single Cut? e.g. if you want mel spectrograms, F0, energy, etc. as separate features in a model, can you implement each one separately and call compute_features and get them as separate arrays/tensors?

pzelasko commented 3 weeks ago

Yes, one example is given towards the end of this tutorial https://github.com/lhotse-speech/lhotse/blob/master/examples/04-lhotse-shar.ipynb

if you don’t want to go into tar archives you can use any of the feature writers in a pattern like this: cut.my_feature = writer.store_array(…)