Skip to content
New issue

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

Possible bug in moonshine-web prevBuffers management. #24

Open
ShaheedHaque opened this issue Dec 26, 2024 · 0 comments
Open

Possible bug in moonshine-web prevBuffers management. #24

ShaheedHaque opened this issue Dec 26, 2024 · 0 comments

Comments

@ShaheedHaque
Copy link

ShaheedHaque commented Dec 26, 2024

In moonshine-web, the content of prevBuffers is effectively consumed around

for (const prev of prevBuffers) {

but prevBuffers itself does not seem to be consumed. Changing the reset() function to add this line is a possible fix:

const reset = (offset = 0) => {
...
  BUFFER.fill(0, offset);
  bufferPointer = offset;
  isRecording = false;
  postSpeechSamples = 0;
  prevBuffers = [];                  <<<<<< added line
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant