lhotse-speech / lhotse

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

Fixing recording move to memory #1306

Open Tomiinek opened 3 months ago

Tomiinek commented 3 months ago

move_to_memory seems to fail for some cuts that have other audio soruce than file, no offset and duration matching the whole recording. I am fixing this for the url type, but probably still fails with the command or shar sources.

Also, I dont understand why there are Case #1 and Case #2 in this method (I suppose case 1 is here to avoid additional decoding), especially when the user specifies a format that does not match the format of the original source. It looks like the case 1 condition should check also for the formats. 🤔 So feel free to fix it properly.