{"id":15017880,"url":"https://github.com/thinh-vu/ur_audio_sub","last_synced_at":"2025-04-12T12:52:55.617Z","repository":{"id":62745742,"uuid":"562159310","full_name":"thinh-vu/ur_audio_sub","owner":"thinh-vu","description":"Generate text captions for audio files \u0026 youtube video using OpenAI Whisper on Google Colab. Multiple languages support.","archived":false,"fork":false,"pushed_at":"2023-04-22T15:08:23.000Z","size":133,"stargazers_count":15,"open_issues_count":2,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-06T09:23:03.614Z","etag":null,"topics":["audio-to-text","audio-transcription","caption-generator","speech-recognition","whisper"],"latest_commit_sha":null,"homepage":"","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/thinh-vu.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":"2022-11-05T13:47:30.000Z","updated_at":"2024-08-12T14:43:19.000Z","dependencies_parsed_at":"2023-01-23T18:15:18.945Z","dependency_job_id":null,"html_url":"https://github.com/thinh-vu/ur_audio_sub","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/thinh-vu%2Fur_audio_sub","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thinh-vu%2Fur_audio_sub/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thinh-vu%2Fur_audio_sub/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thinh-vu%2Fur_audio_sub/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thinh-vu","download_url":"https://codeload.github.com/thinh-vu/ur_audio_sub/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248571637,"owners_count":21126520,"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":["audio-to-text","audio-transcription","caption-generator","speech-recognition","whisper"],"created_at":"2024-09-24T19:51:07.362Z","updated_at":"2025-04-12T12:52:55.597Z","avatar_url":"https://github.com/thinh-vu.png","language":"Jupyter Notebook","funding_links":["https://patreon.com/thinhvu?utm_medium=clipboard_copy\u0026utm_source=copyLink\u0026utm_campaign=creatorshare_creator"],"categories":[],"sub_categories":[],"readme":"# I. INTRODUCTION\n`ur_audio_sub` made generating captions easy for any audio files \u0026amp; youtube video using OpenAI Whisper. Multiple languages support.\n\n\u003cdiv id=\"badges\" align=\"center\"\u003e\n\u003cimg src=\"https://img.shields.io/pypi/pyversions/ur_audio_sub?logoColor=brown\u0026style=plastic\" alt= \"Version\"/\u003e\n\u003cimg src=\"https://img.shields.io/pypi/dm/ur_audio_sub\" alt=\"Download Badge\"/\u003e\n\u003cimg src=\"https://img.shields.io/github/last-commit/thinh-vu/ur_audio_sub\" alt=\"Commit Badge\"/\u003e\n\u003cimg src=\"https://img.shields.io/github/license/thinh-vu/ur_audio_sub?color=red\" alt=\"License Badge\"/\u003e\n\u003c/div\u003e\n\n# II. REFERENCES\n\u003e You can skip all of these introductions by viewing the [Video demo here](https://www.youtube.com/watch?v=0Tg8WCLnWIQ?utm_source=Github\u0026utm_medium=ur_audio_sub). Let's start generating audio transcription effortlessly.\n\n## 2.1. First thing first\nYou can find the demo Jupiter notebook [here](https://github.com/thinh-vu/ur_audio_sub/blob/main/Demo_transcribe%20audio%20file%20%26%20Youtube%20video%20with%20ur_audio_sub%202022-11-07.ipynb), make a copy and play with this package on Google Colab to generate your first transcription with only 3 steps and 5 lines of code literally.\n\n\u003cdetails\u003e\n  \u003csummary\u003e Demonstration\u003c/summary\u003e\n\n  ![open_in_google_colab](https://github.com/thinh-vu/ur_audio_sub/blob/main/src/open-notebook-in-google-colab.png?raw=true)\n\n\u003c/details\u003e\n\n\n### Install whisper package\nYou will need to install OpenAI whisper package from source using pip:\nLet's runt this command in the terminal fist: `!pip install git+https://github.com/openai/whisper.git -q`\n\n\u003cdetails\u003e \n\u003csummary\u003e Install ffmpeg (optional) \u003c/summary\u003e\n\n### Install ffmpeg\nIn case ffmpeg-python doesn't work, you will need ffmpeg be installed separately to start generating captions:\n- on Ubuntu or Debian, or Google Colab: `sudo apt update \u0026\u0026 sudo apt install ffmpeg`\n- on MacOS using [Homebrew](https://brew.sh/): `brew install ffmpeg`\n- on Windows using [Chocolatey](https://chocolatey.org/): `choco install ffmpeg`\n- on Windows using [Scoop](https://scoop.sh/): `scoop install ffmpeg`\n\n\u003c/details\u003e\n\n### Google Colab is highly recommended\nGo to the Google Colab menu: Select `Runtime` \u003e `Change runtime type` and make sure that `GPU` has been chosen. You can run this AI model way faster with GPU on Google Colab than the normal CPU or your personal computer.\n\n![gpu_setting](https://github.com/thinh-vu/ur_audio_sub/blob/main/src/Google%20Colab%20runtime%20GPU.png?raw=true)\n\n## 2.2. How to install this package?\n- Using pip to installed pre-builded package on Pypip `pip install ur_audio_sub`\n- If you want to use the latest pydata_master version instead of the stable one, you can install it from source with the following command:\n`pip install git+https://github.com/thinh-vu/ur_audio_sub.git@main`\n\n_(*) You might need to insert a `!` before your command when running terminal commands on Google Colab._\n\n## 2.3. Where can I find the generated caption?\nPlease find it in the same folder where you store the audio file. On Google Colab, you can find it in the root folder when generating subtitles for Youtube videos.\n\n## Function references\n- Run this command first to import the package to your working environment before using any functions below `from ur_audio_sub import *`\n\n- `ytSub(link='YOUR_YOUTUBE_URL', model='medium', language='', translate=False, lmt=LMT, basepath=ROOT_DIR)` or `ytSub('YOUR_YOUTUBE_URL')` in short\n- `subGen_path(file_path, model='medium', language='', translate=False)` or `subGen_path('YOUR_FILE_PATH')` in short\n\n- In case of any issue that happens, you can't generate the Youtube Video caption with `ytSub` function; try the `subGen_path` function with the audio file downloaded path to solving that issue. You can also try this terminal command instead `!whisper 'PATH_TO_YOUR_AUDIO_FILE' --model medium`.\n\n# III. APENDICES\n- This package has been built on top of pytube and OpenAI Whisper:\n  - [pytube](https://github.com/pytube/pytube) is a genuine, lightweight, dependency-free Python library (and command-line utility) for downloading YouTube videos.\n  - [whisper](https://github.com/openai/whisper): Whisper is a general-purpose speech recognition model. It is trained on a large dataset of diverse audio and is also a multi-task model that can perform multilingual speech recognition as well as speech translation and language identification.\n\n# IV. 🙋‍♂️ CONTACT INFORMATION\nYou can contact me at one of my social network profiles:\n\n\u003cdiv id=\"badges\" align=\"center\"\u003e\n  \u003ca href=\"https://www.linkedin.com/in/thinh-vu\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/LinkedIn-blue?style=for-the-badge\u0026logo=linkedin\u0026logoColor=white\" alt=\"LinkedIn Badge\"/\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://www.messenger.com/t/mr.thinh.ueh\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/Messenger-00B2FF?style=for-the-badge\u0026logo=messenger\u0026logoColor=white\" alt=\"Messenger Badge\"/\u003e\n  \u003ca href=\"https://www.youtube.com/channel/UCYgG-bmk92OhYsP20TS0MbQ\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/YouTube-red?style=for-the-badge\u0026logo=youtube\u0026logoColor=white\" alt=\"Youtube Badge\"/\u003e\n  \u003c/a\u003e\n  \u003c/a\u003e\n    \u003ca href=\"https://github.com/thinh-vu\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/GitHub-100000?style=for-the-badge\u0026logo=github\u0026logoColor=white\" alt=\"Github Badge\"/\u003e\n  \u003c/a\u003e\n\u003c/div\u003e\n\n---\n\nIf you want to support my open-source projects, you can \"buy me a coffee\" via [Patreon](https://patreon.com/thinhvu?utm_medium=clipboard_copy\u0026utm_source=copyLink\u0026utm_campaign=creatorshare_creator) or Momo e-wallet (VN). Your support will help to maintain my blog hosting fee \u0026 to develop high-quality content.\n\n![momo-qr](https://github.com/thinh-vu/vnstock/blob/main/src/momo-qr-thinhvu.jpeg?raw=true)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthinh-vu%2Fur_audio_sub","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthinh-vu%2Fur_audio_sub","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthinh-vu%2Fur_audio_sub/lists"}