I have a function in my Meteor app that retrieves .wav data based on a text input. I now want to convert this .wav data into .mp3 format and play the audio within my app. How can I accomplish this?
Meteor.call("watsonaudio",wusername,wpassword,text, function(error, results) {
console.log("Insideeeeee");
if(results){
console.log("resultsss",results.content);
var audio = new Audio(results.content);
//audio.src = results.content;
audio.play();
console.log("audio played");
}
});
In the code snippet above, results.content
contains .wav data structured like (RIFFWAVEfmt ....). How can I successfully play this audio file?