This is a simple Ruby command-line tool that allows dropping in an AI buddy to your podcast.
Install the gem and add to the application's Gemfile by executing:
$ bundle add podcast-buddy
If bundler is not being used to manage dependencies, install the gem by executing:
$ gem install podcast-buddy
Run your buddy from the command-line:
podcast-buddy
This will install a couple dependencies, if they don't exist:
git
(for cloning whisper.cpp locally)sdl2
- Simple DirectMedia Layer; for cross-platform audio input access- whipser.cpp with streaming – For transcribing audio in near-real-time
Other requirements:
- OpenAI token stored in your environment as
OPENAI_ACCESS_TOKEN
- MacOS
At any time, you can press the return
key and ask your buddy a question.
Once you see the question show up in the output, press return
key again and
your Buddy will answer using the system output (via afplay
).
Once you're done, simply ctrl-c
to wrap things up.
Each session directory contains:
transcript.log
- Full transcript of the discussionsummary.log
- Summarization of the discussiontopics.log
- List of topics extracted from the discussionshow-notes.md
- Generated show notes in markdown formatwhisper.log
- Raw whisper transcription logsresponse.mp3
- Latest AI response audio file
Session files are managed by the PodcastBuddy::Session
class. Each session maintains its own set of files in a timestamped directory (or custom named directory if specified with --name
).
debug mode: podcast-buddy --debug
– shows verbose logging
custom whisper model: podcast-buddy --whisper base.en
– use any of these available models.
custom session: podcast-buddy --name "Ruby Rogues 08-15-2024"
– saves files to a new tmp/Ruby Rogues 08-15-2024/
directory.
Note: Both podcast-buddy
and podcast_buddy
commands are available and work identically.
Configure PodcastBuddy globally:
PodcastBuddy.configure do |config|
# Basic settings
config.whisper_model = "base.en" # Choose whisper model
config.root = "path/to/files" # Set root directory for files
config.logger = Logger.new($stdout, level: Logger::DEBUG)
config.openai_client = OpenAI::Client.new(access_token: ENV["OPENAI_ACCESS_TOKEN"]) # Optional: custom OpenAI client
# AI Prompts (optional)
config.topic_extraction_system_prompt = "Custom prompt for topic extraction..."
config.topic_extraction_user_prompt = "Custom prompt for user topics..."
config.discussion_system_prompt = "Custom prompt for discussion..."
config.discussion_user_prompt = "Custom prompt for user discussion..."
end
The AI prompts are used to customize how PodcastBuddy interacts during the recording:
topic_extraction_system_prompt
: Guides how topics are extracted from discussionstopic_extraction_user_prompt
: Template for processing user's discussion into topicsdiscussion_system_prompt
: Sets the AI's role and behavior during discussionsdiscussion_user_prompt
: Template for processing ongoing discussions
Default prompts are provided but can be customized for specific needs.
PodcastBuddy organizes recordings into sessions. Each session has its own directory containing all related files.
To start a named session:
podcast-buddy --name "My Awesome Podcast Episode 1"
This creates a new directory at tmp/My Awesome Podcast Episode 1/
containing all session files. If no name is provided, a timestamped directory is created automatically.
After checking out the repo, run bin/setup
to install dependencies. Then, run rake spec
to run the tests. You can also run bin/console
for an interactive prompt that will allow you to experiment.
To install this gem onto your local machine, run bundle exec rake install
. To release a new version, update the version number in version.rb
, and then run bundle exec rake release
, which will create a git tag for the version, push git commits and the created tag, and push the .gem
file to rubygems.org.
Bug reports and pull requests are welcome on GitHub at https://github.com/codenamev/podcast-buddy. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the code of conduct.
The gem is available as open source under the terms of the MIT License.
Everyone interacting in the PodcastBuddy project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.