Open iver56 opened 3 years ago
Agreed. A contribution would be welcome :)
I might do this when I'm free! I'm a little (severe understatement) short on time at the moment but it shouldn't be too bad to implement (famous last words)
That's cool :) Btw, here's a related idea: A transform that is a combination of time stretching and pitch shifting, but does it in one operation, so it gets roughly the same execution time as time stretching
wow i would not have thought of that one myself, that's quite genius ðŸ§
I'm glad you liked my idea ^^ Should I create an issue for that, then?
Yep!
roses are red pitch-shift was merged to HEAD time-stretch separately? why not both instead?
The idea is ambitious, new and deep, But we also have other promises to keep. The issue number is #101, Let's hope it gets picked up by someone. Too bad that we are limited on time, but at least we have time for a rhyme
oh my god this is beautiful lmaooooooooooooooooooooooooooo i love it
Hi @iver56! First of all, really nice that you are maintaining this project :) I work with audio AI models a lot and use audiomentations
for many of them.
Since TimeStretch
doesn't exist yet, following torch-time-stretch
and audiomentations
, I implemented a class for it. Since this transform changes the length of audio, this snippet of code from core.transforms_interface
raises an error:
if self.mode == "per_example":
if not self.are_parameters_frozen:
self.randomize_parameters(selected_samples, sample_rate)
cloned_samples[ # <---
self.transform_parameters["should_apply"]
] = self.apply_transform(selected_samples, sample_rate)
Error:
RuntimeError: shape mismatch: value tensor of shape [xxx] cannot be broadcast to indexing result of shape [1, 1, yyy]
How would you address this? Thank you in advance
Hey :) I will check this out in a few days.
Nice profile pic btw ^^
Thanks!
I've submitted a PR (it is not complete) so you can view the code
this sounds like something that wouldn't be too bad to work on, since pitch shifting is half time transform anyway!