How to convert .wav data to .mp3 and play audio in Meteor

I have a Meteor call that takes text as a parameter and returns the WAV data of that particular text. Now I need to convert this to .mp3 and play this sound in my Meteor application. How can i do 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 above code, it results.contenthas .wav data something like (RIFF WAVEfmt ....). Now, how can I make him play?

+4
source share
1 answer

"wav" , HTMLAudioElement ( , ) howler.js. Internet Explorer "wav" , .

, 'mp3', , IE 'wav'. , .

, , Meteor, , , Meteor. , .

, wav mp3 , . "wav" , "mp3" .

0

Source: https://habr.com/ru/post/1671973/


All Articles