Using OpenAi`s Whisper API to Translate Audio to another Language + Text Translation with NextJS
HTML-код
- Опубликовано: 8 янв 2025
- In this tutorial, we explore the power of OpenAI's Whisper API to translate audio to another language and text translation using only NextJS.
OpenAI API allows us to build a Chatbot using the latest text-davinci-003 (which many consider as GPT3.5 model). And then the Whisper API to be able to Get Audio as an input then Transcribe it to Text then get the Transcription and Translate it to another language in less than a minute.
What do we cover in this Video?
1. We will set up our environment and build our api end point
2. We will build our AudioTranslate Component and our TextTranslate Component
3. And that's it
Links
Postman: www.postman.com
Visual Studio Code:code.visualstu...
Android Studio:developer.andr...
Audio and TXT Files
Audio: www.dropbox.co...
Languages: www.dropbox.co...
Github
Thank you for this tutorial! Gonna watch it real soon! Keep up the good work!
I clone the rrepo but there is an error when i Translate it 400 error {"success":false,"error":"Failed to translate"}
Conflicting app and page file was found, please remove the conflicting files to continue:
"pages\index.tsx" - "app\page.tsx" what am i doing wrong
hey imm making something similar whenever i record something it creates a tmp file and read the data from it and delte once it reads but how do i deploy that in production?
I want to be sure I understand your question. Do you mean the recorded audio is outputting a tmp file or did you mean to say mp3? Let me know then I can advise.
@@techjoe1so basically im building a next js 14 app. using openai transcriptions. when i stop recording a audio.wav file is created in tmp folder as a static file and after transcription it gets deleted. how do i do that in production env im deploying on vercel
Just wanna ask the generate.ts, where are you use it? In my case, the code didn't run perfectly, thanks.
Did you check the repo?
github.com/dacemedia/my-app
Great video. Question let's say we want to use a RUclips link how can we use whisper to transcribe the RUclips link.. is there a library that we can use that will take the link paste by the user and convert it to mp4 then transcribe it??
yes there is one
In the transcription function by using the API key in the header you are exposing it to the browser
Fine for a personal project that is not deployed, Not the best way to do It for a client facing app
Thanks for that. Yes absolutely, will remember to mention that in the next videos.
How do I download your brain? Coding makes absolutely no sense to me. I can't wait to find these translation tools online, because I sure as hell have no idea how to put all this together.
github repo?
Great video can u provide source code?
github.com/dacemedia/my-app