{"id":20573565,"url":"https://github.com/timf34/article2audio","last_synced_at":"2025-06-21T05:06:26.215Z","repository":{"id":237538586,"uuid":"794671136","full_name":"timf34/Article2Audio","owner":"timf34","description":"Convert articles to audio using OpenAI's Text to Speech API via a python script or web app","archived":false,"fork":false,"pushed_at":"2024-12-06T05:39:18.000Z","size":12490,"stargazers_count":9,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-05-26T19:54:17.214Z","etag":null,"topics":["fastapi","newspaper","openai","python","scraping","text-to-speech"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/timf34.png","metadata":{"files":{"readme":null,"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":"2024-05-01T17:51:59.000Z","updated_at":"2025-04-19T12:01:22.000Z","dependencies_parsed_at":"2024-06-20T19:57:34.205Z","dependency_job_id":"ce2a42c1-d19e-4ecb-90ab-692be6e37abe","html_url":"https://github.com/timf34/Article2Audio","commit_stats":null,"previous_names":["timf34/article2audio"],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/timf34/Article2Audio","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timf34%2FArticle2Audio","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timf34%2FArticle2Audio/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timf34%2FArticle2Audio/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timf34%2FArticle2Audio/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/timf34","download_url":"https://codeload.github.com/timf34/Article2Audio/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timf34%2FArticle2Audio/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261066503,"owners_count":23104768,"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":["fastapi","newspaper","openai","python","scraping","text-to-speech"],"created_at":"2024-11-16T05:28:08.799Z","updated_at":"2025-06-21T05:06:26.205Z","avatar_url":"https://github.com/timf34.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"﻿# Article2Audio\r\n\r\n## Convert any article to audio with OpenAI's TTS API \r\n\r\nArticle2Audio is a web app that allows users to copy the URL to an article and receive back a lovely audio version \r\nof the article to download locally as a mp3 file. With some configuring and setting up an RSS feed, users can also \r\nautomatically sync these audio files to their favorite podcast app as part of a personal podcast for easy listening on \r\nthe go.\r\n\r\nFor ease of use, we also include a simple python script which allows users to directly convert article URLs to audio \r\nfiles without needing to spin up the web app. \r\n\r\nIt's currently **very** barebones and a work in progress, but the functionality is all there!\r\n\r\n\u003cp align=\"center\"\u003e\r\n  \u003cimg src=\"assets/overview_screenshot.jpg\" alt=\"Overview Screenshot\" width=\"800\"/\u003e\r\n  \u003cbr\u003e\r\n  \u003cem\u003e\u003cstrong\u003eSimple\u003c/strong\u003e web app (left), synced articles available as a personal podcast on Spotify, Podbean, etc. \r\n  (right)\u003c/em\u003e\u003c/em\u003e\r\n\u003c/p\u003e\r\n\r\n\r\n\r\n### Sample Audio Output\r\n\r\n[Sample Audio](https://github.com/timf34/Article2Audio/assets/66926418/bd6fb7e4-812d-455e-93df-1c12560eca13)\r\n\r\n\r\n##  Installation: Web App \r\n\r\n1. **Clone the repository:**\r\n   ```bash\r\n   git clone https://github.com/timf34/Article2Audio.git\r\n   cd Article2Audio\r\n   ```\r\n   \r\n2. **Create `.env` files**\r\n\r\n   **Client `.env` file_**\r\n\r\n   First create a `.env` file within the `/client` directory and add your localhost (or URL if you're deploying)\r\n   to it:\r\n   ```bash\r\n    cd client\r\n    echo \"REACT_APP_API_URL=http://localhost:8001/api\" \u003e .env\r\n   ```\r\n\r\n   **Server `.env` file**\r\n\r\n   Then create a `.env` file within the `/server` directory and add the following environment variables:\r\n   ```bash\r\n   cd server\r\n   echo \"OPENAI_KEY=your-openai-key\" \u003e .env\r\n   echo \"AWS_ACCESS_KEY_ID=your-aws-access-key\" \u003e\u003e .env\r\n   echo \"AWS_SECRET_ACCESS_KEY=your-aws-secret-key\" \u003e\u003e .env\r\n   ```\r\n   Note that the AWS keys are optional and for uploading to S3 for the RSS feed, \r\n   but the OpenAI key is required for the app to function.\r\n\r\n      \r\n3. **Setup Nginx** (Optional)\r\n\r\n   If you would like to set up a proper web server with a custom domain, you can use Nginx. \r\n   We include `scripts/setup_nginx.sh` to help you set up Nginx on an Ubuntu server.\r\n\r\n\r\n4. **Build and run Docker**\r\n\r\n   This will spin up the web app:\r\n    ```bash\r\n    docker compose up --build\r\n    ```\r\n\r\n## Installation: Configure RSS feed and sync to personal podcast\r\n\r\nAssuming that you are running the web app on a server with a domain name, you can set up an RSS feed to sync the audio\r\nfiles to your favorite podcast app. We have built support for doing this using AWS S3, but you of course can switch this\r\nout for any other cloud storage provider, just ensure that your bucket is publicly accessible.\r\n\r\nWe will assume you know how to set up an S3 bucket and make it publicly accessible, and how to get your AWS keys. I'll \r\ninclude the S3 bucket policy [here](assets/make_s3_bucket_public_policy.json) to help.\r\n\r\n1. **Update the `/server/data/rss.xml file with your own info**\r\n   \r\n   Update the `/server/data/rss.xml` file with your own information (this will be obvious). This is the RSS feed that \r\n   will be used to sync the audio files to your podcast app.\r\n\r\n   To ensure that this has worked, visit `www.yourdomain.com/rss.xml` and check that the file is accessible.\r\n\r\n2. **Submit the RSS feed URL to podcast hosting services**\r\n   \r\n   Submit the RSS feed URL to your favorite podcast hosting service (e.g. Spotify, Apple Podcasts, etc.) and you should \r\n   be able to listen to your articles as a podcast!\r\n\r\n   To do so with Spotify or Apple, you'll have to make an account. But many other podcast apps will allow you to add a\r\n   custom RSS feed URL without needing an account, such as [PodcastAddict](https://podcastaddict.com/submit). \r\n   \r\nThe audio files will automatically upload to S3 once they've been generated, and should be available soon thereafter\r\non your podcast app of choice. \r\n\r\n\r\n## Installation: Simple Python Script \r\n\r\nWe also include a simple python script that allows users to convert article URLs to audio files without needing to spin\r\nup the web app. \r\n\r\n1. **Clone the repository:**\r\n   ```bash\r\n   git clone https://github.com/yourusername/Article2Audio.git\r\n   cd Article2Audio\r\n   ```\r\n\r\n2. **Add your OpenAI api key**\r\n   \r\n   If you have not already, create a `.env` file in the `/server` directory and add your openAI key to it:\r\n   ```bash\r\n    cd server\r\n    echo \"OPENAI_KEY=your-openai-key\" \u003e .env\r\n    ```\r\n\r\n3. **Install the required packages:**\r\n   ```bash\r\n    pip install -r server/requirements.txt\r\n    ```\r\n\r\n### Python Script Usage\r\n\r\nThe script `convert_article_urls_to_audio.py` allows for two modes of operation:\r\n\r\n1. **Default Mode**: By default it will use the URLs specified in the `HARDCODED_URLS` list at the top of the file.\r\n   ```bash\r\n   python convert_article_urls_to_audio.py\r\n   ```\r\n   \r\n2. **Command Line Mode**: Overrides hardcoded URLs by specifying URLs via the command line with the --urls option.\r\n   ```bash\r\n   python convert_article_urls_to_audio.py --urls https://www.thefitzwilliam.com/p/james-joyce-was-a-complicated-man \"https://www.honest-broker.com/p/how-picasso-turned-me-into-a-strategy\"\r\n   ```\r\n\r\n\r\n## License \r\n\r\nArticle2Audio is licensed under a GPL-3.0 license.\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimf34%2Farticle2audio","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftimf34%2Farticle2audio","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimf34%2Farticle2audio/lists"}