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

fix: wait queue/task finished on stopTranscribe #119

Merged
merged 5 commits into from
Sep 7, 2023
Merged

Conversation

jhen0409
Copy link
Member

@jhen0409 jhen0409 commented Sep 5, 2023

Fix #107.

Currently we used encoder_begin_callback for the abort method, but it does not directly terminate the thread. This PR change the context uses an own dispatch_queue_t & wait it finished on stop method or release.

It probably have the same issue on Android, I'll investigating for it later.

  • [ ] Release queue on invalidating

@jhen0409 jhen0409 changed the title fix: wait dispatch_queue_t finished on stopTranscribe fix(ios): wait dispatch_queue_t finished on stopTranscribe Sep 5, 2023
@EmanuelCampos
Copy link

I had an issue that sometimes after I call stop, the capturing isn't being updated to false, can this be related to that? not sure how to reproduce yet to open a issue, not happening often

@jhen0409
Copy link
Member Author

jhen0409 commented Sep 7, 2023

I had an issue that sometimes after I call stop, the capturing isn't being updated to false, can this be related to that? not sure how to reproduce yet to open a issue, not happening often

I think it's not related to this PR. I can check this out, currently it check the state before stop the audio queue, and can't promising not has some side effect.

@jhen0409 jhen0409 changed the title fix(ios): wait dispatch_queue_t finished on stopTranscribe fix: wait queue/task finished on stopTranscribe Sep 7, 2023
@jhen0409 jhen0409 merged commit ec68cba into main Sep 7, 2023
4 checks passed
@jhen0409 jhen0409 deleted the fix-wait-stop branch September 7, 2023 06:04
jobpaardekooper added a commit to jobpaardekooper/whisper.rn that referenced this pull request Sep 7, 2023
jobpaardekooper added a commit to jobpaardekooper/whisper.rn that referenced this pull request Sep 7, 2023
jhen0409 pushed a commit that referenced this pull request Sep 7, 2023
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

Successfully merging this pull request may close these issues.

Releasing whisperContext shortly after you initialise it crashes on iOS
2 participants