We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
` async function getBase64() { const result = await axios.get(request.params.arrbu, { responseType: 'arraybuffer' }); return result.data } let arrayBuffer = await getBase64() console.log(arrayBuffer) var samples = new Uint16Array(arrayBuffer); encodeMono(1, 32000, samples);
function encodeMono(channelNum, sampleRate, samples) { var buffer = []; var mp3enc = new lamejs.Mp3Encoder(channelNum, sampleRate, 192); var remaining = samples.length; var maxSamples = 1152; for (var i = 0; remaining >= maxSamples; i += maxSamples) { var mono = samples.subarray(i, i + maxSamples); var mp3buf = mp3enc.encodeBuffer(mono); if (mp3buf.length > 0) { buffer.push(new Uint8Array(mp3buf)); } remaining -= maxSamples; } var flushData = mp3enc.flush(); if (flushData.length > 0) { buffer.push(new Uint8Array(flushData)); } const buf3 = Buffer.concat(buffer); }
`
The sound quality in node environment is not good. How can I improve it
The text was updated successfully, but these errors were encountered:
No branches or pull requests
`
async function getBase64() {
const result = await axios.get(request.params.arrbu, { responseType: 'arraybuffer' });
return result.data
}
let arrayBuffer = await getBase64()
console.log(arrayBuffer)
var samples = new Uint16Array(arrayBuffer);
encodeMono(1, 32000, samples);
`
The sound quality in node environment is not good. How can I improve it
The text was updated successfully, but these errors were encountered: