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
My system: Linux Kubuntu 20.04
When I try to play something, it crumples the beginning second or two of the recording and I hear a noise.
My code is doing something like this:
const stream = fs.createReadStream('test/fixtures/01.wav'); const transcoderStream = new prism.FFmpeg({ args: ['-i', '-', '-f', 's16le', '-ar', '16000', '-channel_layout', 'mono'], }); const speaker = new Speaker({ channels: 1, bitDepth: 16, sampleRate: 16000, }); stream .pipe(transcoderStream) .pipe(speaker);
When I run this script repeatedly, the artifact is somehow different each time. I.e." khhhh", "phftttt", "kchttttttt" LOL
It looks like there's some data left in some playback buffer, but I have no idea what it could be.
This is how I shutdown my script:
process.on('SIGINT', async function () { stream.destroy(); await pEvent(stream, 'close'); process.exit(); });
I also tried calling speaker.destroy(); but it didn't make any difference for the issue.
speaker.destroy();
If I however output the same stream to aplay for example:
stream .pipe(transcoderStream) .pipe(process.stdout);
with:
$ node play-wav.js | aplay -f S16_LE -r 16000
there are no any artifacts and occasional restarts don't bring them.
So there seems to be a problem in the Speaker playback tract.
What is going wrong?
The text was updated successfully, but these errors were encountered:
No branches or pull requests
My system: Linux Kubuntu 20.04
When I try to play something, it crumples the beginning second or two of the recording and I hear a noise.
My code is doing something like this:
When I run this script repeatedly, the artifact is somehow different each time. I.e." khhhh", "phftttt", "kchttttttt" LOL
It looks like there's some data left in some playback buffer, but I have no idea what it could be.
This is how I shutdown my script:
I also tried calling
speaker.destroy();
but it didn't make any difference for the issue.If I however output the same stream to aplay for example:
with:
there are no any artifacts and occasional restarts don't bring them.
So there seems to be a problem in the Speaker playback tract.
What is going wrong?
The text was updated successfully, but these errors were encountered: