jpemartins / speex.js

Speex codec in Javascript. Mirror from https://code.ua.pt/projects/speex-js
214 stars 63 forks source link

Can you provide an example on how to use this lib in a node app ? #28

Open AbdelMat-CP opened 7 years ago

AbdelMat-CP commented 7 years ago

Hi,

It's a real great work, unable to find some speex lib on javascript world apart this one !

In fact, i want to use this on a node app but i am stuck on its real usage in this environment, i tried someting like a simple :

require('./lib/speex'); var speexDecoder = new SpeexDecoder({mode: 1, bits_size:640});

but node is crashing with error :

speex.js:5528 global.libspeex.generateStructInfo = libspeex.generateStructInfo || Runtime.generateStructInfo; ^ ReferenceError: libspeex is not defined

I'm on windows machine.

Thank you for your help.