Closed lannodev closed 1 year ago
I found a solution:
const audioCtx = new AudioContext({
// This samplerate is required by basic-pitch
sampleRate: 22050
})
const audioBuffer = await audioCtx.decodeAudioData(buffer);
const mono = audioBuffer.getChannelData(0);
Hi everyone 👋 Documentation say: "While you may use stereo audio as an input to our model, at prediction time, the channels of the input will be down-mixed to mono, and then analyzed and transcribed."
I'm trying to get stereo audio notes using basic-pitch and I got this error: Error: Input audio buffer is not mono! Number of channels is 2. Should be 1
Why this happens?