{"id":30770510,"url":"https://github.com/sanand0/generative-ai-group","last_synced_at":"2025-09-04T23:08:56.028Z","repository":{"id":293960957,"uuid":"981567729","full_name":"sanand0/generative-ai-group","owner":"sanand0","description":"Podcast generator for chats from a Generative AI Group on WhatsApp","archived":false,"fork":false,"pushed_at":"2025-08-24T06:44:32.000Z","size":13691,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-08-30T13:54:53.866Z","etag":null,"topics":["llm","tool"],"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/sanand0.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,"zenodo":null}},"created_at":"2025-05-11T12:05:22.000Z","updated_at":"2025-08-24T06:44:35.000Z","dependencies_parsed_at":"2025-05-18T07:38:01.814Z","dependency_job_id":"0b69ec23-f214-4619-8b2e-c00d6d173bdc","html_url":"https://github.com/sanand0/generative-ai-group","commit_stats":null,"previous_names":["sanand0/generative-ai-group"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/sanand0/generative-ai-group","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sanand0%2Fgenerative-ai-group","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sanand0%2Fgenerative-ai-group/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sanand0%2Fgenerative-ai-group/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sanand0%2Fgenerative-ai-group/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sanand0","download_url":"https://codeload.github.com/sanand0/generative-ai-group/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sanand0%2Fgenerative-ai-group/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273685604,"owners_count":25149722,"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-09-04T02:00:08.968Z","response_time":61,"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":["llm","tool"],"created_at":"2025-09-04T23:08:51.723Z","updated_at":"2025-09-04T23:08:56.020Z","avatar_url":"https://github.com/sanand0.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Gen AI WhatsApp Podcast Automator\n\nA CLI tool and Python library to transform threaded WhatsApp Gen AI group transcripts into\n[a weekly podcast](https://github.com/sanand0/generative-ai-group/releases/download/main/podcast.xml) by\n\n- **Parsing** JSON exports of WhatsApp messages into threaded, weekly files.\n- **Generating** a polished two-host dialogue script via OpenAI `gpt-4.1-mini`.\n- **Narrating** per-speaker TTS segments via OpenAI `gpt-4o-mini-tts` and concatenating into `podcast-$WEEK.mp3`.\n\n## Setup\n\nYou need:\n\n- A [scraped WhatsApp JSON export](https://tools.s-anand.net/whatsappscraper/) of the Gen AI Group chat as [`gen-ai-messages.json`](gen-ai-messages.json)\n- [`uv`](https://docs.astral.sh/uv/)\n- Environment variable `OPENAI_API_KEY` with a valid OpenAI API key.\n- `ffmpeg` installed and in `PATH` for audio concatenation.\n\n```bash\ngit clone https://github.com/sanand0/generative-ai-group.git\ncd generative-ai-group\nexport OPENAI_API_KEY=\"sk-...\"\nuv run podcast.py\n```\n\nOptionally, modify the voice style and podcast script prompts in [`config.toml`](config.toml)\n\nThis will:\n\n1. Read and filter messages.\n2. Group them by ISO-week (Sunday start).\n3. For each week, it creates:\n   - `{week}/messages.txt` (threaded transcript).\n   - `{week}/podcast.md` (dialogue script).\n   - `{week}/{line}.opus` files which are concatenated into...\n   - `{week}/podcast.mp3`.\n\nHow It Works:\n\n1. `load_messages()` filters out items with null `time`, `text`, or missing `author`.\n2. `group_by_week()` buckets by Sunday of each ISO week.\n3. `build_threads()` indexes by `messageId`, collects replies via `quoteMessageId`, sorts roots chronologically.\n4. `render_message()` writes indented “– Author: Text \\[reactions]” lines.\n5. `get_podcast_script()` POSTs system + user prompts to OpenAI API, calculates cost.\n6. `generate_podcast_audio()` splits the script by speaker, sends TTS requests, writes `.opus`, and FFmpeg-concats into MP3.\n\n## Release\n\nOne-time setup of [GitHub release](https://github.com/sanand0/generative-ai-group/releases/tag/main):\n\n```bash\ngh release create main --title \"Podcast\" --notes \"Generative AI WhatsApp Group Podcast\"\n```\n\nUpload and overwrite all podcasts:\n\n```bash\ngh release upload main --clobber */podcast-*.mp3\ngh release upload main --clobber podcast.xml\n```\n\nUpload specific podcast:\n\n```bash\ngh release upload main $WEEK/podcast-$WEEK.mp3\ngh release upload main --clobber podcast.xml\n```\n\n## License\n\n[MIT](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsanand0%2Fgenerative-ai-group","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsanand0%2Fgenerative-ai-group","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsanand0%2Fgenerative-ai-group/lists"}