No project description provided
Project description
talk2pdf
talk2pdf converts videos of talks into a PDF with the transcript and associated screenshots.
Video | Result |
---|---|
Prerequisites
talk2pdf uses OpenAI's APIs -- you will need an OpenAI API key.
Note Your API key is ONLY used to make OpenAPI calls.
- Create an OpenAI account
- Go to platform.openai.com
- Click on your account in the top right
- Click View API Keys
- Click "Create new secret key"
- You will need to provide this API key to talk2pdf (see below)
talk2pdf
uses FFmpeg for video/audio operations and yt-dlp to download video from online streaming services.
brew install ffmpeg yt-dlp
apt-get install ffmpeg yt-dlp
Running
Warning This will cost ~$0.50 / hr of video
This will generate a PDF in the current directory:
With a youtube video
pipenv shell
pip install talk2pdf
export OPENAPI_SECRET=sk-...
python -m talk2pdf <youtube-url>
Or, with an existing video file
pipenv shell
pip install talk2pdf
export OPENAPI_SECRET=sk-...
python -m talk2pdf <video-file>
Configuration
talk2pdf
looks in TALK2PDF_CONFIG_DIR
, then XDG_CONFIG_HOME/talk2pdf
, and finally $HOME/.config/talk2pdf
for a config.json
file.
You can put your OpenAI key in there instead of setting it in the environment
{
"openapi_secret": "sk-..."
}
talk2pdf
uses TALK2PDF_CACHE_DIR
, or XDG_CACHE_HOME/talk2pdf
, or finally $HOME/.cache/talk2pdf
as a cache directory.
This is where intermediate files are stored.
Contributing
pipenv shell
pip install --editable .
python -m talk2pdf ...
pip install --upgrade build twine
rm -rf dist
python -m build
python3 -m twine upload dist/*
Roadmap
- add timestamps to each paragraph
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.