Ok, I donot know myself, it is giving very weird errors.
Thanks alot, Kevin, for all your support.
You are a patient man to endure me. 
I will let you know, if I am able to solve it.
Thanks a lot, again…
Sorry we weren’t able to solve it but definitely let me know if you figure it out.
Hi Kevin, thanks for all your support.
I solved it by using “file” mode, and then accesing the path by audio_input.name, and then including it in Path(), and passing to learner.
Hi Kevin, please help me out, with audio augmentations, like time-shift, etc
How, to use them with fastaudio
Thanks
What have you tried so far? What roadblocks are you facing? Which augmentations are you trying to use?
Hi @KevinB , can I ask why the new version of fastaudio doesn’t use nbdev ? I remember the last version of fastaudio used it, then it is easier to experiment with.
Thanks
The core developers that maintain fastaudio were more comfortable with the current stack than using nbdev. It could be converted to nbdev but would require effort to do so and would also require people willing to maintain that version going forward.
Hi @KevinB , I am using following transforms:
item_tfms2 = [ResizeSignal(3000,AudioPadType.Repeat),
SignalShifter(),
ChangeVolume(),
aud2spec2,
#MaskFreq(),
MaskTime(),
#SGRoll(),
]
Hello guys,
I have audio files for which I extracted the mfcc features, and I ended up with train dataset of size 3082092 frames by 30 mfcc: torch.Size([3082092, 31]) .
What is the best way to stack 10 frames to feed to the DNN?
Currently, I’m doing it this way, but I’m not sure if this is correct.
train_data = torch.split(train_data, 10)
Hi, I am trying to use some kind of transform that can randomly crop 3 sec from relatively long time lengths i.e 9-10 sec and can skip silence etc based on some energy threshold.
Is there any way to do it in fastaudio.
Thanks.
Also ResizeSignal, crops the spectrogram or what?
Thanks alot for any help.
Sorry, I haven’t touched the codebase in a long time so I’m not positive the following will work, but I believe it should.
- in fastaudio/augment/preprocess there is a
RemoveSilencetransform that takes an energy thresholdthreshold, and a min_durationpad_ms. All sections of the audio longer than2*pad_mswhere the audio never surpasses an energy level ofthresholdwill be removed by this transform. -
ResizeSignalrandomly crops the signal to the desired duration (in ms). So in your caseResizeSignal(3000)would grab 3 seconds of audio.
If you apply RemoveSilence and then ResizeSignal(3000) you should end up with 3s audio clips that don’t contain silence. Hope that helps.
Thanks alot.
Yes, I got it.
Hi Everyone,
My name is Fabio. I am a data scientist from São Paulo, Brazil.
I am currently working at Hospital Alemão Oswaldo Cruz.
I used FastAi’s audio modulo (FastAudio) to create a model that classifies birds using their distinctive sound.
Here is a post in Medium about it: Bird Sound Calssification Using FastAudio (FastAi) | by Fabio Freller | Nov, 2021 | Medium
Hope you can enjoy it. I would also love some feedback and suggestions.
Thank you!
Just a quick warning to everyone wanting to use fastaudio in their AI projects: The library isn’t being maintained as of 11/2023 (see unsolved issues). pip and conda won’t install the most recent version for you due to dependencies on older, unavailable torchaudio versions.
As a audio beginner I’ve found some value in the general Audio introduction from the fastaudio documentation and the linked Fourier Transforms introduction from 3Blue1Brown. But besides that I will proceed using torchaudio directly.
Thanks for the heads-up. Out of curiosity, do you know why it is now unmaintained? Is it just my impression that audio gets little love?
No clue, sorry.
Torchaudio seems to be under active development and I’m looking into audiomentations / torch-audiomentations for data augmentation.
I would say there are a few reasons that the project isn’t currently maintained at least in my view. fastai has changed a lot and because fastaudio wasn’t part of the core functionality, every time something was updated with fastai, fastaudio needed to make a similar change after the fact. This along with the maintainers having other priorities are the two things that I think led to the project becoming stale. Probably another reason is that audio has been an under-utilized area (in the machine learning community as a whole, not just in fastai sphere).
I know that Dr Scott Hawley has still been working on this concept still here is a recent notebook that he uses fastaudio based on Rob Bracco’s original tutorial: Introduction to Audio.ipynb - Colaboratory (google.com).
Through an open PR on the fastai GitHub repo I’ve found this forked version of fastaudio by @Maimonator which has some dependency fixes and seems to run well with Python 3.11 and recent versions of torchaudio.
I created a fastaudio conda repo with python=3.11 and checked out the update-to-latest branch from @Maimonator’s repo. Here are the commands:
conda create -n fastaudio python=3.11
conda activate fastaudio
git clone https://github.com/Maimonator/fastaudio.git
cd fastaudio
git checkout update-to-latest
pip install -e '.[dev,testing]'
Even a switch to the latest version of fastai, pytorch, torchaudio worked by adjusting the setup.cfg. You can download the adjusted version from my repo. Make sure to checkout the update-to-latest branch.