{"id":13419754,"url":"https://github.com/antiboredom/audiogrep","last_synced_at":"2025-03-15T05:32:59.031Z","repository":{"id":27658824,"uuid":"31144460","full_name":"antiboredom/audiogrep","owner":"antiboredom","description":"Creates audio supercuts.","archived":true,"fork":false,"pushed_at":"2024-03-27T04:37:44.000Z","size":39,"stargazers_count":961,"open_issues_count":18,"forks_count":63,"subscribers_count":33,"default_branch":"master","last_synced_at":"2024-10-01T07:26:26.922Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://antiboredom.github.io/audiogrep","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"codefellows-seattle-javascript-401d19/16-19-auth","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/antiboredom.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-02-21T22:54:57.000Z","updated_at":"2024-09-10T08:17:36.000Z","dependencies_parsed_at":"2024-06-21T19:08:45.771Z","dependency_job_id":"92ff4d43-3461-4753-b7a9-346a6aa08ca7","html_url":"https://github.com/antiboredom/audiogrep","commit_stats":{"total_commits":36,"total_committers":8,"mean_commits":4.5,"dds":"0.41666666666666663","last_synced_commit":"1d6efd1629191a039465148db8d7e5b65798cc32"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antiboredom%2Faudiogrep","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antiboredom%2Faudiogrep/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antiboredom%2Faudiogrep/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antiboredom%2Faudiogrep/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/antiboredom","download_url":"https://codeload.github.com/antiboredom/audiogrep/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243690112,"owners_count":20331726,"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":"2024-07-30T22:01:20.388Z","updated_at":"2025-03-15T05:32:58.736Z","avatar_url":"https://github.com/antiboredom.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"Audiogrep\n=========\n\n## alert! this package is no longer being updated! use [videogrep](https://github.com/antiboredom/videogrep) instead (which now supports audio). \n\nAudiogrep transcribes audio files and then creates \"audio supercuts\" based on search phrases. It uses [CMU Pocketsphinx](http://cmusphinx.sourceforge.net/) for speech-to-text and [pydub](http://pydub.com/) to stitch things together.\n\nHere's some [sample output](http://lav.io/2015/02/audiogrep-automatic-audio-supercuts/).\n\n## Requirements\nInstall using pip\n```\npip install audiogrep\n```\nInstall [ffmpeg](http://ffmpeg.org/) with Ogg/Vorbis support. If you're on a mac with [homebrew](http://brew.sh/) you can install ffmpeg with:\n```\nbrew install ffmpeg --with-libvpx --with-libvorbis\n```\nFinally, install [CMU Pocketsphinx](http://cmusphinx.sourceforge.net/). For mac\nusers I followed [these instructions](https://github.com/watsonbox/homebrew-cmu-sphinx) to get it working:\n```\nbrew tap watsonbox/cmu-sphinx\nbrew install --HEAD watsonbox/cmu-sphinx/cmu-sphinxbase\nbrew install --HEAD watsonbox/cmu-sphinx/cmu-sphinxtrain # optional\nbrew install --HEAD watsonbox/cmu-sphinx/cmu-pocketsphinx\n```\n\n## How to use it\nFirst, transcribe the audio (you'll only need to do this once per audio track, but it can take some time)\n```\n# transcribes all mp3s in the selected folder\naudiogrep --input path/to/*.mp3 --transcribe\n```\nThen, basic use:\n```\n# returns all phrases with the word 'word' in them\naudiogrep --input path/to/*.mp3 --search 'word'\n```\nThe previous example will extract phrase chunks containing the search term, but you can also just get individual words:\n```\naudiogrep --input path/to/*.mp3 --search 'word' --output-mode word\n```\nIf you add the '--regex' flag you can use regular expressions. For example:\n```\n# creates a supercut of every instance of the words \"spectre\", \"haunting\" and \"europe\"\naudiogrep --input path/to/*.mp3 --search 'spectre|haunting|europe' --output-mode word --regex\n```\nYou can also construct 'frankenstein' sentences (mileage may vary):\n```\n# stupid joke\naudiogrep --input path/to/*.mp3 --search 'my voice is my passport' --output-mode franken\n```\nOr you can just extract individual words into files.\n```\n# extracts each individual word into its own file in a directory called 'extracted_words'\naudiogrep --input path/to/*.mp3 --extract\n\nExporting to: extracted_words/i.mp3\nExporting to: extracted_words/am.mp3\nExporting to: extracted_words/the.mp3\nExporting to: extracted_words/key.mp3\nExporting to: extracted_words/master.mp3\n```\n\n### Options\n\naudiogrep can take a number of options:\n\n#### --input / -i\nmp3 file or pattern for input\n\n#### --output / -o\nName of the file to generate. By default this is \"supercut.mp3\"\n\n#### --search / -s\nSearch term\n\n#### --output-mode / -m\nSplice together phrases, single words, fragments with wildcards, or \"frankenstein\" sentences.\nOptions are:\n* sentence: (this is the default)\n* word\n* fragment\n* franken\n\n#### --padding / -p\nTime in milliseconds to add between audio segments. Default is 0.\n\n#### --crossfade / -c\nTime in milliseconds to crossfade audio segments. Default is 0.\n\n#### --extract / -x\n\n#### --demo / -d\nShow the results of the search without outputing a file\n\n### Troubleshooting\n\nIf you receive the error \"ERROR: \"cmd_ln.c\", line 942: Unknown argument: -alignctl\", uninstalling and reinstalling cmu-sphinxbase and cmu-pocketsphinx may solve the issue. \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fantiboredom%2Faudiogrep","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fantiboredom%2Faudiogrep","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fantiboredom%2Faudiogrep/lists"}