Skip to content

fix: make sure we are not combining chunks when only one chunk provided#334

Merged
mkopcins merged 8 commits intosoftware-mansion:mainfrom
MateWW:fix/only-one-chunk-available
Jun 2, 2025
Merged

fix: make sure we are not combining chunks when only one chunk provided#334
mkopcins merged 8 commits intosoftware-mansion:mainfrom
MateWW:fix/only-one-chunk-available

Conversation

@MateWW
Copy link
Copy Markdown
Contributor

@MateWW MateWW commented May 25, 2025

Description

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

  • 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

  • iOS
  • Android

Testing instructions

I cannot share the code but just simply provide very short waveform to transcribe method of useSpeechToText hook

Screenshots

Before After
Screen.Recording.2025-05-25.at.13.45.34.mov
Screen.Recording.2025-05-25.at.13.45.02.mov

Checklist

  • I have performed a self-review of my code
  • My changes generate no new warnings

Additional notes

@pweglik pweglik assigned pweglik and mkopcins and unassigned pweglik May 27, 2025
@pweglik pweglik requested a review from mkopcins May 27, 2025 08:27
@mkopcins mkopcins enabled auto-merge (squash) May 27, 2025 08:45
@mkopcins mkopcins disabled auto-merge May 27, 2025 08:45
@mkopcins
Copy link
Copy Markdown
Collaborator

@MateWW can you resolve conflicts?

msluszniak and others added 5 commits May 28, 2025 21:45
## Description

* Fix Heading in `Quickstart - Running Llama` and make it compatible
* Update link to ready-made models in table of contents
* Remove unnecessary horizontal bars from `Quickstart - Running Llama`
* Rephrase section with minimal supported versions
* Make more visible names of examples in  `Example` section
* And emoji to warning section and unlink from table of content as it is
a part of the `Example` section

### Type of change

- [ ] 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)
- [x] Documentation update (improves or adds clarity to existing
documentation)

### Tested on

- [x] iOS
- [x] Android

### Testing instructions

No testing necessary.

### Screenshots

Not applicable

### Related issues

Not applicable

### Checklist

- [x] I have performed a self-review of my code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have updated the documentation accordingly
- [ ] 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: Jakub Gonera <38468585+JakubGonera@users.noreply.github.com>
software-mansion#341)

## Description

Add section about using different recognizers.

### Type of change

- [ ] 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)
- [x] Documentation update (improves or adds clarity to existing
documentation)

### Tested on

- [ ] iOS
- [ ] Android

### Testing instructions

<!-- Provide step-by-step instructions on how to test your changes.
Include setup details if necessary. -->

### Screenshots

<!-- Add screenshots here, if applicable -->

### Related issues

<!-- Link related issues here using #issue-number -->

### Checklist

- [x] I have performed a self-review of my code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have updated the documentation accordingly
- [ ] My changes generate no new warnings

### Additional notes

<!-- Include any additional information, assumptions, or context that
reviewers might need to understand this PR. -->
## Description

This PR introduces new structure of repository:
- apps directory - contains standalone applications which are using
package from `packages` directory
- packages - contains react native executorch library
### Type of change

- [ ] 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
- [x] Android

### Testing instructions

<!-- Provide step-by-step instructions on how to test your changes.
Include setup details if necessary. -->

### Screenshots

<!-- Add screenshots here, if applicable -->

### Related issues

<!-- Link related issues here using #issue-number -->

### Checklist

- [ ] I have performed a self-review of my code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have updated the documentation accordingly
- [ ] 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: pweglik <36445788+pweglik@users.noreply.github.com>
software-mansion#343)

## Description

We don't use it anywhere in the library - artifact of the past.

### 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


### Checklist

- [x] I have performed a self-review of my code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have updated the documentation accordingly
- [x] My changes generate no new warnings
@msluszniak
Copy link
Copy Markdown
Member

@mkopcins I rebased, feel free to merge

Comment thread packages/react-native-executorch/src/controllers/SpeechToTextController.ts Outdated
@mkopcins mkopcins merged commit f3cca9f into software-mansion:main Jun 2, 2025
2 checks passed
mkopcins added a commit that referenced this pull request Jun 5, 2025
…ed (#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>
mkopcins added a commit that referenced this pull request Jun 5, 2025
…ed (#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>
mkopcins added a commit that referenced this pull request Oct 15, 2025
…ed (#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>
mkopcins added a commit that referenced this pull request Oct 15, 2025
…ed (#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>
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.

5 participants