{"id":24161571,"url":"https://github.com/zcaceres/spec_augment","last_synced_at":"2025-04-05T17:07:33.140Z","repository":{"id":49645468,"uuid":"182902900","full_name":"zcaceres/spec_augment","owner":"zcaceres","description":"🔦 A Pytorch implementation of GoogleBrain's SpecAugment: A Simple Data Augmentation Method for Automatic Speech Recognition ","archived":false,"fork":false,"pushed_at":"2021-06-11T13:29:34.000Z","size":30101,"stargazers_count":492,"open_issues_count":2,"forks_count":61,"subscribers_count":14,"default_branch":"master","last_synced_at":"2025-03-29T16:07:53.344Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://arxiv.org/abs/1904.08779","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zcaceres.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-04-23T01:59:44.000Z","updated_at":"2025-03-05T00:39:57.000Z","dependencies_parsed_at":"2022-08-16T03:30:20.019Z","dependency_job_id":null,"html_url":"https://github.com/zcaceres/spec_augment","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zcaceres%2Fspec_augment","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zcaceres%2Fspec_augment/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zcaceres%2Fspec_augment/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zcaceres%2Fspec_augment/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zcaceres","download_url":"https://codeload.github.com/zcaceres/spec_augment/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247369952,"owners_count":20927928,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-01-12T17:17:22.716Z","updated_at":"2025-04-05T17:07:33.114Z","avatar_url":"https://github.com/zcaceres.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SpecAugment with Pytorch\n## A Pytorch Implementation of GoogleBrain's SpecAugment: A Simple Data Augmentation Method for Automatic Speech Recognition\n[Medium Article](https://towardsdatascience.com/sota-data-augmentation-with-google-brains-specaugment-and-pytorch-d3d1a3ce291e)\n\n[SpecAugment](https://ai.googleblog.com/2019/04/specaugment-new-data-augmentation.html) is a state of the art data augmentation approach for speech recognition.\n\nThe paper's authors did not publish code that I could find and their implementation was in TensorFlow. We implemented all three SpecAugment transforms using Pytorch, torchaudio, and [fastai](https://fast.ai) / [fastai-audio](https://github.com/zcaceres/fastai-audio).\n\n## To use:\n1. Run `install.sh` (I recommend using a unique `conda` env for the project)\n\nAfter the install script runs, you should have a `torchaudio` folder in your project folder.\n\n2. Check out SpecAugment.ipynb (a Jupyter notebook) for the functions.\n\n### Augmentations\nTime Warp\n![time warp aug](./img/timewarp.png)\n\nTime Mask\n![time mask aug](./img/timemask.png)\n\nFrequency Mask\n![freq mask aug](./img/freqmask.png)\n\nCombined:\n![combined augs](./img/combined.png)\n\n### Note on Time Warp\nThe Time Warp augmentation relies on Tensorflow-specific functionality not supported in Pytorch. We implemented supporting functions for this augmentation in `SparseImageWarp.ipynb`. You do not need to look at this notebook to use the augmentations. But the Time Warp augmentation depends on code exposed in the `SparseImageWarp` notebook.\n\nLet's be friends!\n- [@zachcaceres](https://twitter.com/zachcaceres)\n- [zach.dev](https://zach.dev)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzcaceres%2Fspec_augment","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzcaceres%2Fspec_augment","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzcaceres%2Fspec_augment/lists"}