How to transcribe an audio file - Whisper API by OpenAI
In this Bubble tutorial we explain how to set up the Whisper API Speech to Text tool by OpenAI with your Bubble app. This will get you started creating an app that takes an audio recording of speech and transforms it into text.
Unlock the power of speech-to-text: Learn how to integrate OpenAI's Whisper API with Bubble in just 4 minutes!
Transform audio to text effortlessly: Discover how to use the API Connector to send voice memos and get instant transcripts.
Master the technical setup of Whisper API: Get step-by-step guidance on configuring the API call and testing it in your Bubble app.
OpenAI's Whisper API Release
As well as exciting news about the ChatGPT API earlier on in the week, there has also been a release of the Whisper API, and Whisper is OpenAI's speech-to-text model, and you can now access this via an API, which means that you can take recordings of someone's voice of their speech through Bubble, and you can get a transcript back from the OpenAI Whisper API, and I'm going to show you how to do that in this video.
Setting Up the API Connector in Bubble
So I'm going to go into my Bubble app, and I have the API connector installed. These are some of the previous tutorials I've recorded, but for now I'm going to create a new API, so this will be called OpenAI, and then I know that OpenAI authenticates through a private key in the header, we'll come back to that. And we need to set up an API call, so let's call this "get transcription", and I'm going to make it an action so that it will appear in a workflow.
Configuring the API Call
I then start basically translating this, so I'm going to copy this endpoint, and paste it in there and make it a post command, and then...so this is slightly different. If you've seen any of my other API third party tutorials, you will notice that it's not a data field or parameter, it is a form. And so in Bubble, we have to say that the body type is form data. Now there is a header which says content type, multi-part data form, so I'm going to copy that. And split it up, make sure I remove the colon, there's no mysterious spaces in there, good.
Adding Parameters to the API Call
And then I can start adding in parameters. So one parameter is model, and then whisper-1. And then I need file, and then I give it a file location, so I add another parameter, this is file. And so it's not private, because I want to be able to create a workflow where I can edit this, but I mean I can insert a file that's been freshly uploaded, for example, and then I need to tick send file.
Testing the API Call
And I'm just going to drag in a very short voice memo I just took on my phone and air dropped to my Mac of me saying a sentence. So you can see the upload is in place there, that's all so I can initialize the call and I can test that the API is working. So there's one thing missing, and that is an API key. So I go over into my openAI account, and I create a new secret key, and I copy that. And I will be deleting this before this video gets uploaded. I place it in there, and let's just check I'm not missing something I am, I need to add in bearer before the key value. Okay, right, I think I have everything in place now to test this out.
Reviewing the API Response
So it's returning JSON, and I can check that that's correct, because I'm expecting a response like this. And yeah, let's give this a test. So initialize call, Bubble is uploading the file to openAI, and I get this back. And that is my voice note, recording a test voice note to test openAI transcription.
Conclusion and Next Steps
So that is it in under 4 minutes. That is the technical side of setting up the Bubble API connector to send an audio file to the whisper API by openAI, and getting a transcript back. And to be honest, it seems very, very quick, and it's a very impressive service. Do leave a comment if you would like a follow-up video where we can build this into a front-end form, so you could create a service that allows a user to upload an audio file, and then you send it off and get the transcript. But I just wanted to tackle the technical side now to help people get going with the whisper API.
Get the Complete Bundle for Just $350 $99
Access 3 courses, 400+ tutorials, and a vibrant community to support every step of your app-building journey.
Start building with total confidence
No more delays. With 30+ hours of expert content, you’ll have the insights needed to build effectively.
Find every solution in one place
No more searching across platforms for tutorials. Our bundle has everything you need, with 400+ videos covering every feature and technique.
Dive deep into every detail
Get beyond the basics with comprehensive, in-depth courses & no code tutorials that empower you to create a feature-rich, professional app.
Save over 70%!
Valued at $80
Valued at $85
Valued at $30
Valued at $110
Valued at $45
Can't find what you're looking for?
Search our 300+ Bubble tutorial videos. Start learning no code today!
Have questions?
We have answers!
Find answers to common questions about our membership plans, programs, and more.
We're here to help you launch your no code SaaS. Reach out to the team and we'll double check our vast library for useful content. We'll advise you on how we'd tackle the same problem and there's a good chance we'll record the video to help the wider community.
As a Planet No Code member, you'll receive a discount on our Bubble coaching sessions. Monthly members receive a 10% discount, while Annual members receive a 17.5% discount. To redeem your discount, simply log into your account and book a coaching session through our platform.
Our 8-week intensive mentorship program is designed to provide personalized guidance and support to help you accelerate your startup journey. You'll be matched with a startup expert who will work with you one-on-one to set goals, overcome challenges, and make rapid progress.
To apply for the Mastery Program, simply click the "Request Invitation" button on our pricing page and fill out the application form. Our team will review your application and schedule a call with you to discuss your goals and determine if the program is a good fit for your needs.
We accept all major credit cards, including Visa, Mastercard, American Express, and Discover.
While we don't offer a free trial, we do provide a 14-day money-back guarantee. If you're not completely satisfied with your membership within the first 14 days, simply contact our support team, and we'll issue a full refund.