{"id":13579529,"url":"https://github.com/innovatorved/subtitle","last_synced_at":"2025-04-06T06:11:45.507Z","repository":{"id":207750277,"uuid":"719979605","full_name":"innovatorved/subtitle","owner":"innovatorved","description":"Open-source subtitle generation for seamless content translation.","archived":false,"fork":false,"pushed_at":"2023-12-09T23:23:25.000Z","size":11809,"stargazers_count":415,"open_issues_count":2,"forks_count":14,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-03-30T05:06:08.463Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","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/innovatorved.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}},"created_at":"2023-11-17T10:12:33.000Z","updated_at":"2025-03-25T02:52:00.000Z","dependencies_parsed_at":"2024-01-14T07:20:29.005Z","dependency_job_id":null,"html_url":"https://github.com/innovatorved/subtitle","commit_stats":null,"previous_names":["innovatorved/subtitle"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/innovatorved%2Fsubtitle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/innovatorved%2Fsubtitle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/innovatorved%2Fsubtitle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/innovatorved%2Fsubtitle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/innovatorved","download_url":"https://codeload.github.com/innovatorved/subtitle/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247441053,"owners_count":20939239,"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-08-01T15:01:40.229Z","updated_at":"2025-04-06T06:11:45.456Z","avatar_url":"https://github.com/innovatorved.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# Subtitle\nOpen-source subtitle generation for seamless content translation.\n\nKey Features:\n\n- Open-source: Freely available for use, modification, and distribution.\n- Self-hosted: Run the tool on your own servers for enhanced control and privacy.\n- AI-powered: Leverage advanced machine learning for accurate and natural-sounding subtitles.\n- Multilingual support: Generate subtitles for videos in a wide range of languages.\n- Easy integration: Seamlessly integrates into your existing workflow.\n\n\u003e I made this project for fun, but I think it could also be useful for other people.\n\n## Installation\n\n### FFmpeg\nFirst, you need to install FFmpeg. Here's how you can do it:\n\n```bash\n# On Linux\nsudo apt install ffmpeg\n```\n\n## Run\nYou can run the script from the command line using the following command:\n\n```bash\npython subtitle.py \u003cfilepath | video_url\u003e [--model \u003cmodelname\u003e]\n```\nReplace `\u003cfilepath | video_url\u003e` with the path to your video file. The `--model` argument is optional. If not provided, it will use 'base' as the default model.\n\nFor example:\n```bash\npython subtitle.py /path/to/your/video.mp4 --model base\n```\nThis will run the script on the video at `/path/to/your/video.mp4` using the `base` model.\nPlease replace `/path/to/your/video.mp4` with the actual path to your video file.\n\n\n### Models\nHere are the models you can use:\nNote: Use the `.en` model only when the video is in English.\n\n- tiny.en\n- tiny\n- tiny-q5_1\n- tiny.en-q5_1\n- base.en\n- base\n- base-q5_1\n- base.en-q5_1\n- small.en\n- small.en-tdrz\n- small\n- small-q5_1\n- small.en-q5_1\n- medium\n- medium.en\n- medium-q5_0\n- medium.en-q5_0\n- large-v1\n- large-v2\n- large\n- large-q5_0\n\n### Advance\nYou can modify the behaviour by using these parameters `whisper` binary as follows:\n\n\n```bash\n./whisper [options] file0.wav file1.wav ...\n```\n\n### Options\nHere are the options you can use with the `whisper` binary:\n| Option | Default | Description |\n|--------|---------|-------------|\n| `-h, --help` | | Show help message and exit |\n| `-t N, --threads N` | 4 | Number of threads to use during computation |\n| `-p N, --processors N` | 1 | Number of processors to use during computation |\n| `-ot N, --offset-t N` | 0 | Time offset in milliseconds |\n| `-on N, --offset-n N` | 0 | Segment index offset |\n| `-d N, --duration N` | 0 | Duration of audio to process in milliseconds |\n| `-mc N, --max-context N` | -1 | Maximum number of text context tokens to store |\n| `-ml N, --max-len N` | 0 | Maximum segment length in characters |\n| `-sow, --split-on-word` | false | Split on word rather than on token |\n| `-bo N, --best-of N` | 2 | Number of best candidates to keep |\n| `-bs N, --beam-size N` | -1 | Beam size for beam search |\n| `-wt N, --word-thold N` | 0.01 | Word timestamp probability threshold |\n| `-et N, --entropy-thold N` | 2.40 | Entropy threshold for decoder fail |\n| `-lpt N, --logprob-thold N` | -1.00 | Log probability threshold for decoder fail |\n| `-debug, --debug-mode` | false | Enable debug mode (eg. dump log_mel) |\n| `-tr, --translate` | false | Translate from source language to English |\n| `-di, --diarize` | false | Stereo audio diarization |\n| `-tdrz, --tinydiarize` | false | Enable tinydiarize (requires a tdrz model) |\n| `-nf, --no-fallback` | false | Do not use temperature fallback while decoding |\n| `-otxt, --output-txt` | true | Output result in a text file |\n| `-ovtt, --output-vtt` | false | Output result in a vtt file |\n| `-osrt, --output-srt` | false | Output result in a srt file |\n| `-olrc, --output-lrc` | false | Output result in a lrc file |\n| `-owts, --output-words` | false | Output script for generating karaoke video |\n| `-fp, --font-path` | /System/Library/Fonts/Supplemental/Courier New Bold.ttf | Path to a monospace font for karaoke video |\n| `-ocsv, --output-csv` | false | Output result in a CSV file |\n| `-oj, --output-json` | false | Output result in a JSON file |\n| `-ojf, --output-json-full` | false | Include more information in the JSON file |\n| `-of FNAME, --output-file FNAME` | | Output file path (without file extension) |\n| `-ps, --print-special` | false | Print special tokens |\n| `-pc, --print-colors` | false | Print colors |\n| `-pp, --print-progress` | false | Print progress |\n| `-nt, --no-timestamps` | false | Do not print timestamps |\n| `-l LANG, --language LANG` | en | Spoken language ('auto' for auto-detect) |\n| `-dl, --detect-language` | false | Exit after automatically detecting language |\n| `--prompt PROMPT` | | Initial prompt |\n| `-m FNAME, --model FNAME` | models/ggml-base.en.bin | Model path |\n| `-f FNAME, --file FNAME` | | Input WAV file path |\n| `-oved D, --ov-e-device DNAME` | CPU | The OpenVINO device used for encode inference |\n| `-ls, --log-score` | false | Log best decoder scores of tokens |\n| `-ng, --no-gpu` | false | Disable GPU |\n\n\n### Example for running Binary\nHere's an example of how to use the whisper binary:\n\n```bash\n./whisper -m models/ggml-tiny.en.bin -f Rev.mp3 out.wav -nt --output-vtt\n\n```\n\n## License\n\n[MIT](https://choosealicense.com/licenses/mit/)\n\n\n## Reference \u0026 Credits\n\n- [https://github.com/openai/whisper](https://github.com/openai/whisper)\n- [https://openai.com/blog/whisper/](https://openai.com/blog/whisper/)\n- [https://github.com/ggerganov/whisper.cpp](https://github.com/ggerganov/whisper.cpp)\n- [https://github.com/innovatorved/whisper.api](https://github.com/innovatorved/whisper.api)\n\n  \n## Authors\n\n- [Ved Gupta](https://www.github.com/innovatorved)\n\n  \n## 🚀 About Me\nJust try to being a Developer!\n\n  \n## Support\n\nFor support, email vedgupta@protonmail.com\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finnovatorved%2Fsubtitle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Finnovatorved%2Fsubtitle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finnovatorved%2Fsubtitle/lists"}