jamsch / expo-speech-recognition

Speech Recognition for React Native Expo projects
MIT License
128 stars 11 forks source link

fix(ios): nomatch event firing on iOS 18+ #43

Closed jamsch closed 1 month ago

jamsch commented 1 month ago

This PR fixes an issue where the nomatch event fires on iOS 18 due to an upstream iOS 18 issue to do with final result detection

Example event order in iOS 18:

{ isFinal: false, transcripts: ["actually", "final", "results"], metadata: { duration: 1500 } },
{ isFinal: true, transcripts: [] }

Which we translate in this library to the following events being emitted:

"result" { isFinal: true, transcripts: ["actually", "final", "results"] }
"nomatch" {}

This PR gets rid of the "nomatch" emit here