Coder Social home page Coder Social logo

encode() is not working about opus HOT 2 CLOSED

jreich888 avatar jreich888 commented on July 27, 2024
encode() is not working

from opus.

Comments (2)

jreich888 avatar jreich888 commented on July 27, 2024 1

I've done some further digging and testing, and have learned that there are rigid requirements for frame lengths, so you can't throw just any input buffer length and expect it to work. So if you I changed the allocated buffer size to something like 3840 (20ms of 48khz stereo samples), it works.

This wasn't helped by the fact that the "encode" method doesn't check for errors and turn them into strings, like the decode() method does. And when I went back to the xnorpx test code, I think that was failing because my test wav file was 44100 (unsupported sample rate). The rest I'll chalk up to my own learning curve on the opus codec.

But the library's working now, thanks!

from opus.

iCrawl avatar iCrawl commented on July 27, 2024

This is by design of this library.

If you look at the code and the library methods, it just wraps the native opus methods to expose them to node, no further validation or verification is done.

from opus.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.