SpecAugment

A Implementation of SpecAugment with Tensorflow & Pytorch, introduced by Google Brain

https://github.com/DemisEom/SpecAugment

Science Score: 10.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
  • .zenodo.json file
  • DOI references
  • Academic publication links
    Links to: arxiv.org
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (11.1%) to scientific vocabulary

Keywords

data-augmentation python pytorch specaugment speech speech-recognition tensorflow
Last synced: 6 months ago · JSON representation

Repository

A Implementation of SpecAugment with Tensorflow & Pytorch, introduced by Google Brain

Basic Info
  • Host: GitHub
  • Owner: DemisEom
  • License: apache-2.0
  • Language: Python
  • Default Branch: master
  • Homepage:
  • Size: 428 KB
Statistics
  • Stars: 651
  • Watchers: 10
  • Forks: 135
  • Open Issues: 25
  • Releases: 0
Topics
data-augmentation python pytorch specaugment speech speech-recognition tensorflow
Created almost 7 years ago · Last pushed almost 4 years ago
Metadata Files
Readme License

README.md

SpecAugment License

This is a implementation of SpecAugment that speech data augmentation method which directly process the spectrogram with Tensorflow & Pytorch, introduced by Google Brain[1]. This is currently under the Apache 2.0, Please feel free to use for your project. Enjoy!

How to use

First, you need to have python 3 installed along with Tensorflow.

Next, you need to install some audio libraries work properly. To install the requirement packages. Run the following command:

bash pip3 install SpecAugment

And then, run the specAugment.py program. It modifies the spectrogram by warping it in the time direction, masking blocks of consecutive frequency channels, and masking blocks of utterances in time.

Try your audio file SpecAugment

shell $ python3

```python

import librosa from specAugment import specaugmenttensorflow

If you are Pytorch, then import specaugmentpytorch instead of specaugmenttensorflow

audio, samplingrate = librosa.load(audiopath) melspectrogram = librosa.feature.melspectrogram(y=audio, sr=samplingrate, nmels=256, hoplength=128, fmax=8000) warpedmaskedspectrogram = specaugmenttensorflow.specaugment(melspectrogram=melspectrogram) print(warpedmasked_spectrogram) ' [[1.54055389e-01 7.51822486e-01 7.29588015e-01 ... 1.03616300e-01 1.04682689e-01 1.05411769e-01] [2.21608739e-01 1.38559084e-01 1.01564167e-01 ... 4.19907116e-02 4.86430404e-02 5.27331798e-02] [3.62784019e-01 2.09934399e-01 1.79158230e-01 ... 2.42307431e-01 3.18662338e-01 3.67405599e-01] ... [6.36117335e-07 8.06897948e-07 8.55346431e-07 ... 2.84445018e-07 4.02975952e-07 5.57131738e-07] [6.27753429e-07 7.53681318e-07 8.13035033e-07 ... 1.35111146e-07 2.74058225e-07 4.56901031e-07] [0.00000000e+00 7.48416680e-07 5.51771037e-07 ... 1.13901361e-07 2.56365068e-07 4.43868592e-07]] ' ``` Learn more examples about how to do specific tasks in SpecAugment at the test code.

bash python spec_augment_test.py In test code, we using one of the LibriSpeech dataset.

Example result of base spectrogram Example result of base spectrogram

Reference

  1. https://arxiv.org/pdf/1904.08779.pdf

Owner

  • Name: Demis TaeKyu Eom
  • Login: DemisEom
  • Kind: user
  • Location: Korea
  • Company: Toss Securities

Machine Learning Engineer

GitHub Events

Total
  • Issues event: 1
  • Watch event: 16
  • Fork event: 2
Last Year
  • Issues event: 1
  • Watch event: 16
  • Fork event: 2

Committers

Last synced: 9 months ago

All Time
  • Total Commits: 57
  • Total Committers: 7
  • Avg Commits per committer: 8.143
  • Development Distribution Score (DDS): 0.579
Past Year
  • Commits: 0
  • Committers: 0
  • Avg Commits per committer: 0.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
shelling203 s****3@g****m 24
demis d****s@d****l 17
Edward J. Yoon e****n@a****g 7
jybaek o****k@g****m 3
mezz2112 5****2 3
edwardyoon2 e****n@m****m 2
Evangelos Kazakos k****0@g****m 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 9 months ago

All Time
  • Total issues: 32
  • Total pull requests: 8
  • Average time to close issues: 12 days
  • Average time to close pull requests: 8 months
  • Total issue authors: 31
  • Total pull request authors: 8
  • Average comments per issue: 2.41
  • Average comments per pull request: 0.13
  • Merged pull requests: 2
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 2
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 2
  • Pull request authors: 0
  • Average comments per issue: 0.0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • JucyCherry (2)
  • Marcovaldong (1)
  • boji123 (1)
  • lijuncheng16 (1)
  • katrin-ibrahim (1)
  • Hu-Wenchao (1)
  • seriousran (1)
  • ternaus (1)
  • wade3han (1)
  • kimchi88 (1)
  • williamgun007 (1)
  • harrygcoppock (1)
  • helloyide (1)
  • santosh9sanjeev (1)
  • haojun (1)
Pull Request Authors
  • kalfasyan (2)
  • IMLHF (1)
  • cpvannier (1)
  • amazingguni (1)
  • aliceebaird (1)
  • seriousran (1)
  • ekazakos (1)
  • zoink (1)
Top Labels
Issue Labels
Pull Request Labels