{"id":22862870,"url":"https://github.com/yochem/cap","last_synced_at":"2025-08-04T12:10:41.957Z","repository":{"id":102731396,"uuid":"268797958","full_name":"yochem/cap","owner":"yochem","description":"🧢  Convert time-tagged transcripts to good captions","archived":false,"fork":false,"pushed_at":"2020-07-07T22:35:33.000Z","size":501,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-10T00:43:59.456Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://yochem.github.io/cap/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yochem.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"zenodo":null}},"created_at":"2020-06-02T12:42:22.000Z","updated_at":"2020-06-30T22:12:34.000Z","dependencies_parsed_at":null,"dependency_job_id":"d34b03ea-a882-452f-9d6e-6c715f6c2de3","html_url":"https://github.com/yochem/cap","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/yochem/cap","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yochem%2Fcap","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yochem%2Fcap/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yochem%2Fcap/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yochem%2Fcap/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yochem","download_url":"https://codeload.github.com/yochem/cap/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yochem%2Fcap/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268694771,"owners_count":24291879,"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","status":"online","status_checked_at":"2025-08-04T02:00:09.867Z","response_time":79,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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-12-13T10:15:46.406Z","updated_at":"2025-08-04T12:10:41.945Z","avatar_url":"https://github.com/yochem.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# cap - AI powered subtitling\n\nThis project converts a JSON speech-to-text file to a fully functional SRT\nsubtitle file. This SRT file consists of caption groups with if needed, line\nbreaks according to the [subtitle guidelines of the\nBBC](https://bbc.github.io/subtitle-guidelines/#Break-at-natural-points).\n\n\n## Table of Contents\n\n- [Features](#features)\n- [Badges](#badges)\n- [Preview](#preview)\n- [Installation](#installation)\n- [How to run](#how_to_run)\n- [Overview functionality](#overview_functionality)\n- [Support](#support)\n\n\n## Features\n\nThis project mainly generates proper formatted caption groups given a\ntranscript with word-timing. It implements the following rules from the BBC\nguide mentioned above:\n\n- Part-of-Speech tags\n- Punctuation\n- Gaps in speech\n- Character limit (\u003c 84)\n- Line limit (\u003c 42)\n- Characters per second\n- Adding line breaks\n- Complex verb phrases\n\n\n## Badges\n\n![Issues](https://img.shields.io/github/issues-raw/yochem/effect.ai?style=for-the-badge)\n![Last Commit](https://img.shields.io/github/last-commit/yochem/effect.ai?style=for-the-badge)\n![Licence](https://img.shields.io/github/license/yochem/effect.ai?style=for-the-badge)\n\n\n## Preview\n\n![Alt Text](https://media1.giphy.com/media/dBTewOwJiLyelPL2Mv/giphy.gif)\n\n\n## Installation\n\n1. [Clone](https://bit.ly/2BcAdRs) this repository.\n2. Install the package:\n\n```shell\n$ pip3 install -e cap\n```\n\n\n## How to use\n\nIn your shell, run the following:\n\n```shell\n$ cap \u003casr-file\u003e --output \u003csrt-file\u003e\n```\n\nFor more options, run `$ cap -h`.\n\nOr use this module in Python:\n\n```python\n\u003e\u003e\u003e import cap\n\u003e\u003e\u003e subs = cap.group('asr/sample01.asrOutput.json', 'srt-file.srt')\n\u003e\u003e\u003e\n\u003e\u003e\u003e # let's see the first caption group in Python:\n\u003e\u003e\u003e print(*subs[0], sep='\\n')\nWord(text='thanks', start=0.24, end=0.51, weight=5)\nWord(text='to', start=0.51, end=0.6, weight=5)\nWord(text='last', start=0.6, end=0.86, weight=5)\nWord(text='past', start=0.86, end=1.13, weight=5.64)\nWord(text='for\\n', start=1.13, end=1.2, weight=5.96)\nWord(text='sponsoring', start=1.2, end=1.63, weight=5.96)\nWord(text='a', start=1.63, end=1.69, weight=5.34)\nWord(text='portion', start=1.69, end=2.02, weight=5)\nWord(text='of', start=2.02, end=2.12, weight=4.6)\nWord(text='this', start=2.12, end=2.31, weight=4.7)\nWord(text='video', start=2.31, end=2.75, weight=5)\nPunc(text='.', start=2.75, end=2.75, weight=5.95)\n\u003e\u003e\u003e\n\u003e\u003e\u003e # and let's see the first caption group in the srt file:\n\u003e\u003e\u003e with open('srt-file.srt', 'r') as f:\n\u003e\u003e\u003e     content = f.read().split('\\n\\n')[0]\n\u003e\u003e\u003e     print(content)\n1\n00:00:00,240 --\u003e 00:00:02,750\nthanks to last past for\nsponsoring a portion of this video.\n\n```\n\n\n## Development\n\nDocumentation can be found at [Github Pages](yochem.github.io/caps/).\n\nTo install the needed packages for development, run this:\n\n```shell\n$ pip3 install -e cap[dev]\n```\n\nAlso make sure [editorconfig](editorconfig.org/) is installed in your editor\nof choice.\n\nWhen pushing code, first run `$ make check` to lint your code and `$ make doc`\nto create the docs.\n\n\n## Support\n\nFound a bug? Got a question? Please report it using Github\n[issues](https://github.com/yochem/effect.ai/issues)!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyochem%2Fcap","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyochem%2Fcap","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyochem%2Fcap/lists"}