Generating a YouTube summary written by ChatGPT
Large Language Models (LLMs) are effective tools for summarizing large volumes of text.
In part two of this Insight you will learn how to connect Resolve to OpenAI and create a summary of a timeline.
In part one we learned how to make calls to OpenAI and Resolve respective APIs. In this part we will combine the two pieces of code into a single Python script. This script will:
- Transcode the Resolve timeline
- Save the transcript as an .SRT (subtitle) file
- Use HTTP POST to send the .SRT to OpenAI and request a summary
- Download the summary to a .TXT file
Stick around through the end where we show how by making a very small modification to the script we can have OpenAI provide foreign language subtitles instead of a summary.
The scripts used in this Insight are available from the link below.
Make sure to watch part 1 of the Insight before continuing with part 2.
Python experience is beneficial. Resolve Studio is preferred. You could also use the free version of Resolve, but you are limited to running the scripts internally. As you’ll see, this is not very practical.
If you’d like to follow and don’t have Python installed, see the link to Joey’s Insight below. Joey walks you through getting Python installed on your system.
What if you don’t know if you have Python installed? In Resolve, go to Workspaces -> Console and click on “Py3” or “Py2.” Resolve will tell you if Python is missing or if it’s not installed where Resolve expects to find it.
Before using OpenAI API, you must set up an account with OpenAI. Using the API does require a credit card, and you need to provide billing details when creating your account.
Key takeaways from this Insight
By the end of this Insight you should understand how to:
- Integrate OpenAI service with Resolve (or other apps)
- Use OpenAI to translate Resolve subtitles to a foreign language