teapoly / spectrumaugmenter Goto Github PK
View Code? Open in Web Editor NEWPerforms data augmentation as according to the SpecAugment paper. Modified from Lingvo (TensorFlow > 1.10.0).
Performs data augmentation as according to the SpecAugment paper. Modified from Lingvo (TensorFlow > 1.10.0).
Hi,
I'm trying to extend this code and regenerate the wav file from the spectrogram after the augmentation. I added the below line at line 85
wav=librosa.feature.inverse.mel_to_audio(warped_masked_spectrogram)
However, I'm getting the following error .. any idea how this can be fixed?
Traceback (most recent call last): File "optuna.py", line 512, in <module> main(sys.argv[1:]) File "optuna.py", line 427, in main X_train, y_train , X_test , y_test = create_dataset(path) File "optuna.py", line 76, in create_dataset extract_features(wav, cls, model, samples , labels , aug_samples , aug_labels ) File "optuna.py", line 366, in extract_features wav=librosa.feature.inverse.mel_to_audio(warped_masked_spectrogram) File "C:\Users\ash_j\anaconda3\envs\yamnet\lib\site-packages\librosa\feature\inverse.py", line 172, in mel_to_audio stft = mel_to_stft(M, sr=sr, n_fft=n_fft, power=power, **kwargs) File "C:\Users\ash_j\anaconda3\envs\yamnet\lib\site-packages\librosa\feature\inverse.py", line 83, in mel_to_stft mel_basis = filters.mel(sr, n_fft, n_mels=M.shape[0], dtype=M.dtype, **kwargs) File "C:\Users\ash_j\anaconda3\envs\yamnet\lib\site-packages\librosa\filters.py", line 209, in mel weights = np.zeros((n_mels, int(1 + n_fft // 2)), dtype=dtype) TypeError: Cannot interpret 'tf.float32' as a data type
Hello,
The current code doesn't work on tf2. Is there any chance of updating it?
Thanks
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.