{"id":23589563,"url":"https://github.com/jeeftor/chapterize-whisper","last_synced_at":"2025-11-03T22:30:28.071Z","repository":{"id":269092811,"uuid":"906402839","full_name":"jeeftor/chapterize-whisper","owner":"jeeftor","description":"Chapterizer using Whisper","archived":false,"fork":false,"pushed_at":"2024-12-27T02:21:01.000Z","size":1014,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-12-27T03:21:44.725Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/jeeftor.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}},"created_at":"2024-12-20T20:35:32.000Z","updated_at":"2024-12-27T02:21:05.000Z","dependencies_parsed_at":"2024-12-27T03:21:51.167Z","dependency_job_id":null,"html_url":"https://github.com/jeeftor/chapterize-whisper","commit_stats":null,"previous_names":["jeeftor/chapterizer","jeeftor/chapterize-whisper"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeeftor%2Fchapterize-whisper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeeftor%2Fchapterize-whisper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeeftor%2Fchapterize-whisper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeeftor%2Fchapterize-whisper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jeeftor","download_url":"https://codeload.github.com/jeeftor/chapterize-whisper/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239420347,"owners_count":19635549,"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-12-27T06:15:52.237Z","updated_at":"2025-11-03T22:30:28.006Z","avatar_url":"https://github.com/jeeftor.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Chapterize-Whisper\n\n_A utility written to help get better chapters for Audiobookshelf_ \n\nUses whisper and will make some automatic stuff\n\nBatch mode is faster - but - it seems to give worse results for chapterfinding - so we use a slower option.\n\nTo install globally I think you can use:\n\n```bash\npip install -U chapterize-whisper\nchapterize --help\n```\n\n\n# Example\n\nDownload a free audiobook like this one:\n\nhttps://librivox.org/the-adventures-of-danny-meadow-mouse-by-thornton-w-burgess/\n\nand put it in some directory. Then we can use the `chapterize` command like:\n\n```bash\nchapterize detect --dir ./audio/danny_meadow_mouse_1301_librivox        \n```\n\nIt will run a transcription process looking like this maybe:\n\n![transscribe](docs/transcribe.jpg)\n\nOnce done you'll get a `.chapter` file in the directory of your audio files. For example this is what came out:\n\n```\n00:00:00,0000, BOOK Start\n00:01:05,920,  Chapter 1, Danny Meadow Mouse is worried.\n00:04:48,160,  Chapter two, Danny Meadow Mouse and his short tail.\n00:08:06,120,  Chapter 3, Danny Meadow Mouse plays hide and seek.\n00:13:04,759,  Chapter four, old Granny Fox tries for Danny Meadow Mouse.\n00:17:17,137,  Chapter 5.\n00:26:13,777,  Chapter seven, old Granny Fox tries a new plan.\n00:30:15,497,  Chapter 8 Brother Northwind proves a friend.\n00:35:00,017,  chapter 9, Danny Meadowmouse's caught at last.\n00:39:38,975,  CHAPTER X\n00:44:43,015,  Chapter 11, Peter Rabbit gets a fright.\n00:48:35,415,  Chapter 12, the old briar patch has a new tenet.\n00:52:44,135,  Chapter 13.\n00:56:40,975,  Chapter 14, Farmer Brown sets a trap.\n01:01:25,957,  Chapter 15 Peter Rabbit is caught in a snare.\n01:05:32,077,  Chapter 16 Peter Rabbit's hard journey.\n01:07:05,957,  Part of the stake to which the snare had been fastened and which Peter had managed to\n01:10:10,397,  Chapter 17 Danny meadow mouse becomes worried.\n01:15:02,917,  Chapter 18, Danny meadow mouse returns a kindness.\n01:19:15,077,  Chapter 19, Peter Rabbit and Danny Meadowmouse live high.\n01:23:41,237,  Chapter 20.\n01:28:46,237,  Chapter 21, an exciting day for Danny Meadow Mouse.\n01:33:23,997,  Chapter 22\n01:41:31,997,  Chapter 24\n01:46:18,820, BOOK_END\n\n```\n\nYou'll notice some chapters are missing a full description - and some are wrong such as:\n`00:27:43,702,  Part of the stake to which the snare had been fastened and which Peter had managed to`\n\nFor example to fix `Chapter 5.` open up the `.srt` file and look for where chapter 5 is:\n\n```srt\n318\n00:17:17,137 --\u003e 00:17:18,977\nChapter 5.\n\n319\n00:17:18,977 --\u003e 00:17:22,137\nWhat Happened on the Green Meadows\n```\n\nIn this case we can assume the correct title is:\n\n`Chapter 5. What Happened on the Green Meadows`\n\n\nAlso chapter 6 is missing - you can see in the srt it is here:\n\n```srt\n373\n00:21:39,017 --\u003e 00:21:48,497\nEnd of Chapter 5 Chapter 6 Danny Meadow Mouse remembers, and ready Fox, poor kids.\n```\nThis chapter will likely take some tweaking since you need to figure out how long the \"End of Chapter 5\" takes ... but you can also just guess - lets say 2 seconds. So you'd add this to the chapter file:\n\n```\n00:21:41, Chapter 6 Danny Meadow Mouse remembers\n```\n\nOnce you've cleaned up the chapter files it will look like something like this. Maybe you are too lazy and don't want to fill out all the chapter titles - thats fine.\n\n\n```\n00:00:00,0000, BOOK Start\n00:01:05,920,  Chapter 1, Danny Meadow Mouse is worried.\n00:04:48,160,  Chapter two, Danny Meadow Mouse and his short tail.\n00:08:06,120,  Chapter 3, Danny Meadow Mouse plays hide and seek.\n00:13:04,759,  Chapter four, old Granny Fox tries for Danny Meadow Mouse.\n00:17:17,137,  Chapter 5.\n00:21:40,000,  Chapter 6.\n00:26:13,777,  Chapter 7, old Granny Fox tries a new plan.\n00:30:15,497,  Chapter 8 Brother Northwind proves a friend.\n00:35:00,017,  chapter 9, Danny Meadowmouse's caught at last.\n00:39:38,975,  CHAPTER 10\n00:44:43,015,  Chapter 11, Peter Rabbit gets a fright.\n00:48:35,415,  Chapter 12, the old briar patch has a new tenet.\n00:52:44,135,  Chapter 13.\n00:56:40,975,  Chapter 14, Farmer Brown sets a trap.\n01:01:25,957,  Chapter 15 Peter Rabbit is caught in a snare.\n01:05:32,077,  Chapter 16 Peter Rabbit's hard journey.\n01:10:10,397,  Chapter 17 Danny meadow mouse becomes worried.\n01:15:02,917,  Chapter 18, Danny meadow mouse returns a kindness.\n01:19:15,077,  Chapter 19, Peter Rabbit and Danny Meadowmouse live high.\n01:23:41,237,  Chapter 20.\n01:28:46,237,  Chapter 21, an exciting day for Danny Meadow Mouse.\n01:33:23,997,  Chapter 22\n01:41:31,997,  Chapter 24\n01:46:18,820, BOOK_END\n```\n\nThe next step would be to upload this \"chapter definition\" to audiobook shelf.\n\nFirst we need to upload this audiobook itself to Audiobookshelf - and as you can see - it doesnt have any chapter data\n\n![image1](./docs/pre-chapters.jpg)\n\nIf you look at Audiobookshelf's URL you'll see something like this:\n\n`https://audiobookshelf.local/item/2b1a5c2f-02e4-47bb-99ab-cc800aeafec7`\n\nWhat we care about is the UUID for the item:\n\n`2b1a5c2f-02e4-47bb-99ab-cc800aeafec7`\n\nSo with this information we can do the following:\n\n\n```bash\n\n chapterize upload \\\n   --dir ./audio/danny_meadow_mouse_1301_librivox \\\n   --id 2b1a5c2f-02e4-47bb-99ab-cc800aeafec7  \\\n   --abs-url https://audiobookshelf.local \\\n   --api-key this-is-a-fake-api-key\n```\n\n\n[//]: # (### Uploading chapter data)\n\n[//]: # ()\n[//]: # (Next we will use the API https://api.audiobookshelf.org/#book-chapter to turn our .chapter_xxx file into an array of `book chapters` which can be uploaded to audiobookshelf)\n\n[//]: # ()\n[//]: # (and when we are done it looks like this:)\n\n![done](docs/post-chapters.jpg)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjeeftor%2Fchapterize-whisper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjeeftor%2Fchapterize-whisper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjeeftor%2Fchapterize-whisper/lists"}