From the course: Building a Video Transcriber with Node.js and Google AI Speech-To-Text API
Unlock the full course today
Join today to access over 24,600 courses taught by industry experts.
Adding the transcription display function
From the course: Building a Video Transcriber with Node.js and Google AI Speech-To-Text API
Adding the transcription display function
- [Instructor] In a previous video, we called the displayTranscription function to undo the successful response of our transcription operation. In this video, we're going to be writing out that function. This is going to be a very small function. However, it is good for the principle of suppression of concerns to have this action in a different function. Let's scroll down, and just below the button click event handler, let us flesh out our displayTranscription function. (keyboard keys clicking) This function takes in the response as its only argument. Inside the function, set the innerHTML of the transcribedText element to the text property from the response.data. Scroll down. (keyboard keys clicking) The text property is where our transcription result is stored. This will ensure that the transcription is loaded into the container on the right hand side, displaying the transcription results to the user. If you're bit…