You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Promise {
<rejected> Error: In file ../src/encode.cc on line 330, found error: All passed values as arguments must be of type frame.
at run (/home/user/project/index.js:26:27) {
code: '5001'
}
}
The text was updated successfully, but these errors were encountered:
First of all, the decoded frames are located in in "frames" sub property, and not the root object, so you would need to change your encode line to: const p = encoder.encode(frame.frames). Also you need to specify additional opus specific encoding parameters on the encoder like this: (example)
Additionally, if the source "sample_fmt" is not in either s16 or flt bit format (the only possible for opus) you will need a filter in between the decode and encode steps to convert the source format to the destination format defined in the decoder, it's not automatic.
The text was updated successfully, but these errors were encountered: