
Build a php web app that uploads video or audio, transcribes it into plain text using whisper ai, and translates the text into multiple languages.
Install and configure a local web server with XAMPP to run PHP and MySQL, start Apache and MySQL, and verify with localhost.
Create the whisper app directory structure in Zamp by adding a website folder with backend and front end, plus a classes folder for PHP, and an index.php to test locally.
Create the main page for the video/audio to text app by integrating template files and editing index.html and index.php, loading the front-end folders.
Develop a JavaScript function with jQuery to auto-submit a form when a user selects a file, then send it to PHP for validation and converting to text.
Validate the image form using post requests, check file presence with $_FILES, capture the file type (video mp4) in PHP for database storage.
Create a PHP class named whisper with an upload method to handle file uploads, store and manage files, using object-oriented principles and public visibility.
Create a PHP file upload method that validates mime type and 20 mb size, extracts file name and extension, and saves to files folder with md5-based unique name via move_uploaded_file.
Create a MySQL database named my whisper and a five-column table to store uploaded files, including id, file name, file URL, location, and translated text with language and media type.
Create a php db class with a connect method using pdo to link to a mysql database named whisper on localhost with root access, then test connection and echo connected.
Create a free OpenAI account to generate an API key, copy the secret key, and define a non-modifiable API token constant for global use in your project.
Define a new property data type to indicate whether to convert video audio to text or translate text into other languages, and implement getApiURL to return the correct API endpoint.
Create a method to send data to the api, handling the file, model (whisper-1), and header from the speech-to-text docs, and prepare translation using chat completion.
Create a PHP method to send a curl post request to an API that converts video or audio to text and supports translation, decoding the JSON response.
Implement a PHP PDO save method to store uploaded video or audio content in a MySQL database, using prepared statements and binding parameters, returning the last insert id.
Create a page to display recently generated files with a video/audio player and AI-written text, fetch and show the latest files from the database in descending order.
Create a PHP method cat file by id to fetch file data by ID, then display the file content and conditionally render audio or video players.
Develop a Whisper class method to update a file's translated content in the database, using file id, content, and language to run an update query.
Build a post-backed translate function that uses a language dropdown to translate a file's content via whisper, validates allowed languages, updates the file with the translation, and displays the result.
Implement a jquery function that shows a loader image while translating content, hides the translator content, and displays API errors when they occur.
In this course “Create your Own Automatic Speech Recognition Using PHP, MySQL JS WITH Whisper AI”, you will learn how to develop or create your own web app that allow you to covert video / audio file into plain text. we use openai AI model that allow us to build our very ASR tool using php that takes video or audio file and get transcript of that file and also you can use that to translate into many other languages as well.
By taking this course you will gain the skills by building your own AI-Powered app that get the video, audio file content that spoken on the file. With PHP, MySQL, and JavaScript.
You can highlight the project you create in this course, If anyone who sees this project in your portfolio might want to hire you because from this course you will gain skills which will help you to learn to build and Create Automatic Speech Recognition With PHP, MySQL, using OpenAI's Whisper AI API.
Support
By taking this course you will get my full support. I've always loved to help my students (could be you). I’ve answered all that question that students have asked so far. I’m always in a ninja mood, if there’s a question it’ll be answered within a moment. By all this means if you have any errors. I'll be happy to check codes, errors.
This Course Covers The Following Features:
Build Audio/Video Transcription App
Translate Video Audio Content Text into different Languages
Video / Audio Generated Gallery
Video / Audio Upload
Get Content of Video / Audio Files Into Plain text
Please
look at all the lectures to see more things that are covered.