A locally hosted, AI generated podcast from an rss feed.
Powered by -
The application reads an rss feed, extracts the articles and summarises them.
RSS + Ollama + TTS = Podcast
The application reads an rss feed and extracts the articles. Each of these articles are then processed by scraping the article content.
The application uses a locally hosted version of Ollama. The Ollama API is used to summarise the article content. Default model used is mistral:7b
The summarised article content is then converted into an audio podcast using the Coqui TTS API.
This project requires the following dependencies to be installed on your system.
You can install the Ollama server by following the instructions on the official website.
Ollama needs to be running on your local machine for the application to work. The application is configured to use the default Ollama server URL http://localhost:11434/api/generate
. This can be changed via the config.yaml file.
ffmpeg
is a command-line tool for handling multimedia files. It is used to convert the generated audio files to the MP3 format.
You can use Homebrew to install ffmpeg
on macOS:
brew install ffmpeg
- Download the
ffmpeg
build for Windows from the official website. - Extract the downloaded ZIP file.
- Add the
bin
directory from the extracted folder to your system's PATH.
The installation command depends on your Linux distribution.
sudo apt update
sudo apt install ffmpeg
Coqui TTS is a text-to-speech synthesis system that uses deep learning to create human-like speech from text. You can install the Coqui TTS server by following the instructions on the official website.
Start the container by using the following command:
docker run -d -p 5002:5002 --platform linux/amd64 --entrypoint /usr/local/bin/tts-server ghcr.io/coqui-ai/tts-cpu --model_name tts_models/en/ljspeech/vits
Clone the repository and navigate into the directory:
git clone https://github.com/yourusername/your-repo.git
cd your-repo
Then, install the dependencies:
go mod download
To run the application, navigate to the cmd/rss2podcast directory and run:
go run main.go
To run the tests, use the following command:
go test ./...
The application's configuration is stored in a config.yaml
file. Here's what each section does:
This section contains information about the podcast.
podcast:
subject: "News" # The subject of the podcast
podcaster: "Cody" # The name of the podcaster
This section contains information about the RSS feed.
rss:
url: "https://www.reutersagency.com/feed/?taxonomy=best-topics&post_type=best" # The URL of the RSS feed
max_articles: 10 # The maximum number of articles to fetch from the RSS feed
filters: # Keywords to filter articles by
- "Daily"
- "Weekly"
This section contains information about the Ollama service.
ollama:
end_point: "http://localhost:11434/api/generate" # The URL of the Ollama service
model: "mistral:7b" # The model used by the Ollama service
This section contains information about the Text-to-Speech (TTS) service.
tts:
url: "http://localhost:5002/api/tts" # The URL of the TTS service
You can modify these values to suit your needs. Remember to restart the application after making changes to the configuration file.
Contributions are welcome. Please open a pull request with your changes.
This project is licensed under the terms of the MIT License.