Commit 7c911c3
fix: make sure we are not combining chunks when only one chunk provided (#334)
## Description
<!-- Provide a concise and descriptive summary of the changes
implemented in this PR. -->
When I tried to use new whisper release I've noticed that it's for some
reason falling into infinite `generating` state.
I've done investigation and it turned out that simply I was recording
single word what was not longer than 1 chunk.
In result it was causing some silent error which prevented model from
being triggered.
This guard resolves the issue for me.
### Type of change
- [x] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing
functionality to not work as expected)
- [ ] Documentation update (improves or adds clarity to existing
documentation)
### Tested on
- [x] iOS
- [ ] Android
### Testing instructions
<!-- Provide step-by-step instructions on how to test your changes.
Include setup details if necessary. -->
I cannot share the code but just simply provide very short waveform to
`transcribe` method of `useSpeechToText` hook
### Screenshots
<!-- Add screenshots here, if applicable -->
| Before | After |
| --- | --- |
| <video
src="https://github.com/user-attachments/assets/41754d72-31bb-457a-90ec-f6e4447d0fd8"
/> | <video
src="https://github.com/user-attachments/assets/03df1a87-d3c1-4ba7-8aaa-f8a47cd91613"
/> |
### Checklist
- [x] I have performed a self-review of my code
- [x] My changes generate no new warnings
### Additional notes
<!-- Include any additional information, assumptions, or context that
reviewers might need to understand this PR. -->
---------
Co-authored-by: Mateusz Kopcinski <120639731+mkopcins@users.noreply.github.com>
Co-authored-by: Mateusz Sluszniak <56299341+msluszniak@users.noreply.github.com>
Co-authored-by: Jakub Gonera <38468585+JakubGonera@users.noreply.github.com>
Co-authored-by: Norbert Klockiewicz <Nklockiewicz12@gmail.com>
Co-authored-by: pweglik <36445788+pweglik@users.noreply.github.com>1 parent 0870f93 commit 7c911c3
1 file changed
Lines changed: 2 additions & 0 deletions
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
279 | 279 | | |
280 | 280 | | |
281 | 281 | | |
| 282 | + | |
| 283 | + | |
282 | 284 | | |
283 | 285 | | |
284 | 286 | | |
| |||
0 commit comments