This pet project uses the new OpenAI TTS models to take a youtube video, and convert it into an audio resource in the language of your choosing. It does this by following a few steps:
- Retrieves the transcript from Youtube.
- Translates and reformats the transcript using the
GPT3.5
model. - Generates the audio for the transcript using the
tts-1-hd
model. - Combines the individual audio files into one output mp3.
- Create a virtual env and activate it:
python3 -m venv env && source env/bin/activate
- install dependencies:
pip install -r requirements.txt
- Create txt file named
key.txt
with your OpenAI api key.
To generate a "podast"
, run:
python personal-podcast.py <youtube_video_id> <ISO_language_code>