Comments (5)
I think a complete switch would require us to drop support for PyTorch 1.6 and earlier, unless torchaudio 0.7 works with older PyTorch releases? If that's the case, that would be undesirable.
Anyway, we should take care to make the data augmentation interface pretty generic, e.g. accepting augment_fn
in relevant places that has a signature of Callable[[np.ndarray, int], np.ndarray]
with arguments audio_samples
and sampling_rate
- the latter is required as some effects like SoX speed might require resampling afterwards. The augment_fn
would return the augmented time-domain signal.
from lhotse.
Hi @pzelasko
Congrats on the first release 🎉
Regarding the versioning, torchaudio only supports the the version of PyTorch released at the same time. For torchaudio 0.7, it's PyTorch 1.7.0.
We are also interested in providing building blocks for augmentation. We can collaborate in there.
from lhotse.
Thanks, Moto!
And thanks for the clarification. Looking at 0.7 docs, the example using class SoxEffectTransform(torch.nn.Module):
confirms my intuition about moving towards the augment_fn
API in Lhotse - it seems that would play well together, as you could pass such a nn.Module
where such augment_fn
is expected. The only difference I can see is that your transform would also return a sampling_rate
, but I'm not sure if we need to/should support changing the sampling rate as part of data augmentation in Lhotse...?
from lhotse.
The reason why I added the output sample rate is some of the effects (rate
, upsample
, downsample
and speed
AFAIK) change the sampling rate and when I was writing the documentation, I wanted the example to be general enough to cover all the supported effects.
I think it makes sense to limit it to only return the tensor, if it's written for specific purpose. For example, I am thinking that rather than providing a general SoxEffectTransform
, providing a transform that is specialized in solving a specific task, like RandomSpeedPerturbation
(similar to the example in apply_effects_file
function) might be more valuable.
If there are other common use cases of sox effects in training recipes, torchaudio can provide these too.
from lhotse.
@mthrok can you check out if the torchaudio.sox_effects
usage in PR #124 makes sense to you? Also, I've reported an issue in torchaudio where I found an inconsistent torchaudio behavior compared to WavAugment.
from lhotse.
Related Issues (20)
- How to split manifests into several parts HOT 1
- Pytorch dataloader cannot compute length HOT 2
- Create a custom audio transformation HOT 1
- Describe on cuts does not display supervision custom info
- PR #1332 breaks many operations HOT 1
- 'ascii' codec can't encode characters in position 219-247 in processing wenet speech dateset HOT 1
- Multiple feature extractors in a single Cut HOT 1
- AttributeError: 'dict' object has no attribute 'to_dict' HOT 2
- error in window 11 installation HOT 1
- UnicodeEncodeError: 'ascii' codec can't encode characters in position 505-506: ordinal not in range(128) HOT 2
- OSError: [Errno 9] Unable to synchronously open file (unable to lock file, errno = 9, error message = 'Bad file descriptor') HOT 1
- Support for Video Features, for example How2Sign HOT 7
- dataloader slow with shar HOT 3
- Feature calculation process crashing with large dataset HOT 1
- How to combine with huggingface audio datasets? HOT 1
- AudioTransforms are dropped when saving MixedCuts? HOT 2
- How does tar work with DynamicBucketingSampler?
- Read seperate .jsonl.gz from fbank filter them and make a Cutset into single variable. HOT 3
- How to load parquet file effectively with Lhotse? HOT 1
- MUSAN mix to current CutSet: Cannot load audio of cuts in a lazy CutSet. HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lhotse.