capacitor-community / capacitor-community/speech-recognition
Add support for metadata
- Dominant language
- Java
- Stars
- 130
- Forks
- 69
- PR merge metrics
- No merged PRs in 30d
Description
**Is your feature request related to a problem? Please describe.**
It is hard to know when users have finished talking and we can safely send their input for processing. For mobile we handle this with a backoff which sends after 500ms of silence. Depending on the context, we might add extra buffer in there for different situations. We also do some simple text matching to gauge whether the sentence is complete and add a further delay based on the presence of filler words.
**Describe the solution you'd like**
The plugin should consider making more metadata available from either iOS or Android that gives developers more power to interpret the users input. For iOS it would be including `SFSpeechRecognitionMetadata` which includes things such as rate of speech, and average pause length. This could help us know if a user is pausing longer than usual.
**Describe alternatives you've considered**
We are already trying to infer context based on text content.
Ideally another solution would involve making filler words such as "ahh" and "umm" appear in the transcribed results but I believe they are [removed by AI/ML ](https://machinelearning.apple.com/research/speech-recognition) and cannot be force included.
**Additional context**
Link to metadata docs https://developer.apple.com/documentation/speech/sfspeechrecognitionmetadata?changes=_9
Contributor guide
Research direction
No source file, test, or entry point is named. Start by reading the linked SFSpeechRecognitionMetadata documentation and reviewing how the plugin currently exposes speech results on iOS and Android. Define which metadata is available on each platform and what a completed cross-platform API should provide.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, ios
- Domain
- mobile
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100