Did you know you can create affordable and really impressive voiceovers using OpenAI’s API?
Not many people are using this, so here’s a short tutorial on how to do it using a bit of Python code!
AI Voiceovers Made Cheap With OpenAI’s API
Whether you’re a seasoned filmmaker, a content creator on a budget, or a digital entrepreneur looking to innovate, this video is your key to unlocking the potential of AI in your projects.
Why Watch This Video?
– Discover how to leverage OpenAI’s cutting-edge technology to produce natural-sounding voiceovers without breaking the bank.
– Learn step-by-step instructions on integrating OpenAI’s API into your workflow, making AI narration more accessible than ever.
– Gain insights into the benefits of AI voice technology, from cost savings to efficiency and beyond.
Video Transcript
Okay, so what are we looking at here, guys? This is essentially a piece of Python code. I actually got it directly from ChatGPT itself. What we can do is create any kind of voiceover. You enter your text here in the input section, and you’ve got to have the three speech marks in order for it to work with Python.
We’re communicating with the OpenAI API, so you stick your API key in here. What it’s going to do is output the text as an MP3 file in pretty high quality. The model we’re using is tts1, which stands for text-to-speech. The voice itself is called Fable, and out of all the available voices—I think there are about eight—you can check them on the OpenAI page.
The Fable voice is pretty good. It’s sort of a British voice, maybe with a hint of Irish or something in there. We’re just communicating with OpenAI, and for an extract like this—this one is a test about David Lean films—there’s a limit of around 4,500 characters per request to the TTS API.
To get around that, you can still do long voiceovers; you just need to split the text and make multiple requests. For a nine or ten-minute voiceover, I think it took me three requests. I ended up with a nice MP3 file that I could stick into Premiere, Final Cut, or whatever editing software you’re using.
Hopefully, that was helpful. These voices are really high quality, and I’ll include the code below. At the end of this video, I’ll play a little extract of the voiceover for you to hear. It’s pretty cool.