Recognize Audio as Text in JavaScript

Cloudmersive
1 min readAug 24, 2021

--

These days, many meetings have moved to a virtual format to improve convenience and communication. The audio of these meetings is often recorded to ensure accurate documentation of the information provided, but it can also be helpful to have a written copy of the discussion. The following API will simplify the transcription of the recording by automatically converting input audio to text using advanced machine learning.

Let’s kick the process off by running this command to install jQuery:

bower install jquery

Next, we can call the function by inputting the file and API key into the below example code:

var form = new FormData();
form.append("speechFile", fileInput.files[0], "file");
var settings = {
"url": "https://api.cloudmersive.com/speech/recognize/file",
"method": "POST",
"timeout": 0,
"headers": {
"Content-Type": "multipart/form-data",
"Apikey": "YOUR-API-KEY-HERE"
},
"processData": false,
"mimeType": "multipart/form-data",
"contentType": false,
"data": form
};
$.ajax(settings).done(function (response) {
console.log(response);
});

--

--

Cloudmersive
Cloudmersive

Written by Cloudmersive

There’s an API for that. Cloudmersive is a leader in Highly Scalable Cloud APIs.

No responses yet