{"id":23116741,"url":"https://github.com/agituts/gemini-2-tts","last_synced_at":"2025-04-04T01:26:33.735Z","repository":{"id":268352860,"uuid":"904062807","full_name":"agituts/gemini-2-tts","owner":"agituts","description":"AI-Powered Podcast Generator: A Python-based tool that converts text scripts into realistic audio podcasts using Google's Generative AI API. This project leverages advanced text-to-speech technology to create dynamic, multi-speaker conversations with customizable voices.","archived":false,"fork":false,"pushed_at":"2024-12-16T13:20:40.000Z","size":24,"stargazers_count":14,"open_issues_count":0,"forks_count":4,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-09T13:13:57.085Z","etag":null,"topics":["gemini-2-0-flash-exp","generative-language-api","google-ai","googleapis"],"latest_commit_sha":null,"homepage":"","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/agituts.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-16T07:23:37.000Z","updated_at":"2025-02-08T04:27:46.000Z","dependencies_parsed_at":"2024-12-16T08:40:19.077Z","dependency_job_id":"385f677e-4529-4eb1-92b8-900e09e56517","html_url":"https://github.com/agituts/gemini-2-tts","commit_stats":null,"previous_names":["agituts/gemini-2-tts"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agituts%2Fgemini-2-tts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agituts%2Fgemini-2-tts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agituts%2Fgemini-2-tts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agituts%2Fgemini-2-tts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/agituts","download_url":"https://codeload.github.com/agituts/gemini-2-tts/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247105762,"owners_count":20884495,"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":["gemini-2-0-flash-exp","generative-language-api","google-ai","googleapis"],"created_at":"2024-12-17T04:17:15.622Z","updated_at":"2025-04-04T01:26:33.708Z","avatar_url":"https://github.com/agituts.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gemini-2-tts\n\nAI-Powered Podcast Generator: A Python-based tool that converts text scripts into realistic audio podcasts using Google's Generative AI API. This project leverages advanced text-to-speech technology to create dynamic, multi-speaker conversations with customizable voices.\n\n[![Create Unlimited Podcast Audio with Python and Google’s AI: A Step-by-Step Guide](https://img.youtube.com/vi/cu-56pBQSEM/maxresdefault.jpg)](https://www.youtube.com/watch?v=cu-56pBQSEM)\n\nFeatures:\n\n- Text-to-speech conversion using Google's Generative AI\n- Support for multiple speakers with distinct voices\n- Automatic audio file generation and combination\n- Customizable voice selection\n- Robust error handling and retry mechanisms\n  \nPrerequisites:\n\n- Python 3.8 or higher\n- FFmpeg installed and accessible in system PATH\n- Google API key for Generative AI services\n  \nSystem Dependencies:\n\nWindows:\n\n- Microsoft Visual C++ 14.0 or greater\n- FFmpeg\n  \nLinux:\n\n```bash\nsudo apt-get install portaudio19-dev python3-dev ffmpeg\n```\n\nmacOS:\n\n```bash\nbrew install portaudio ffmpeg\n```\n\nInstallation:\n\n1) Clone the repository:\n```bash\ngit clone https://github.com/agituts/gemini-2-tts.git\ncd gemini-2-tts\n```\n2) Create and activate virtual environment:\n\nFor Windows:\n```bash\npython -m venv venv\n.\\venv\\Scripts\\activate\n```\nFor Linux/MacOS:\n```bash\npython3 -m venv venv\nsource venv/bin/activate\n```\n3) Install required Python packages:\n```bash\npip install -r requirements.txt\n```\n4) Create a .env file in the project root:\n```bash\nGOOGLE_API_KEY=your_google_api_key_here\nVOICE_A=Puck    # Optional: Default is Puck; Current options are Puck, Charon, Kore, Fenrir, Aoede\nVOICE_B=Kore    # Optional: Default is Kore; Current options are Puck, Charon, Kore, Fenrir, Aoede\n```\nNote: To deactivate the virtual environment when you're done, simply run:\n```bash\ndeactivate\n```\n\nProject Structure:\n\n  podcast_script.txt: Contains the conversation script in the format:\n```text\nSpeaker A: Welcome to our podcast! Today we'll be discussing...\nSpeaker B: Thanks for having me! I'm excited to...\nSpeaker A: Let's start with...\nSpeaker B: That's an interesting point...\n```\n  system_instructions.txt: Contains system-level instructions for voice generation in the format:\n```text\nYou are a real-time energetic and enthusiastic narrator for a podcast.\nThe entire podcast script is provided below this instruction.\nYour job is to narrate only the specific dialogue line provided to you in subsequent messages, responding immediately as if in real-time, using a natural, friendly, and engaging tone.\nWhen narrating, use the context of the entire podcast script to inform your delivery.\nSpeak smoothly and conversationally, not like you are reading off a script.\nPause naturally at commas, periods, and question marks.\nVary your pacing slightly as a person would in real conversation.\nDo not narrate anything assigned to other speakers or identify which speaker is talking.\nOnly narrate the specific dialogues provided to you.\nDo not introduce yourself or any other speaker; simply speak the dialogues as you receive them, as if they were being spoken in that moment.\nThe script is designed for a podcast and contains conversational exchanges between speakers.\nDo not add any additional information unless asked.\nRemember, you must receive and acknowledge the full script first before you begin receiving and narrating individual dialogue lines.\n```\n  .env: Environment variables configuration\n  requirements.txt: Python package dependencies\n\nUsage:\n\n1) Prepare your conversation script in podcast_script.txt\n2) Run the generator:\n```bash\npython app.py\n```\n3) Find the generated podcast as final_podcast.wav\n\nEnvironment Variables:\n\nCreate a .env file with the following variables:\n```text\nGOOGLE_API_KEY=your_google_api_key_here\nVOICE_A=Puck    # Optional: Default is Puck; Current options are Puck, Charon, Kore, Fenrir, Aoede\nVOICE_B=Kore    # Optional: Default is Kore; Current options are Puck, Charon, Kore, Fenrir, Aoede\n```\n\nError Handling:\n\n  The system automatically retries on connection failures\n  Maximum retry attempts: 3\n  Temporary files are automatically cleaned up\n  \nOutput:\n\n  Individual speaker audio files are generated temporarily\n  Final output is combined into final_podcast.wav\n  All temporary files are automatically cleaned up\n  \nLicense:\n\nMIT License\n\nContributing:\n\n1) Fork the repository\n2) Create your feature branch\n3) Commit your changes\n4) Push to the branch\n5) Create a new Pull Request\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fagituts%2Fgemini-2-tts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fagituts%2Fgemini-2-tts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fagituts%2Fgemini-2-tts/lists"}