vueuse icon indicating copy to clipboard operation
vueuse copied to clipboard

Add confidence to useSpeechRecognition

Open Javid-Izadfar opened this issue 1 year ago • 2 comments

Clear and concise description of the problem

Speech recognition API chrome mobile seems to have a problem with isFinal and the transcript result might get duplicated as result.

Suggested solution

add confidence parameter to useSpeechRecognition and filter results (each word) based on it. people can add set confidence to 0 in order to prevent this issue.

Alternative

setting continuous: false should also fix the problem but the UX would not be the same.

Additional context

https://stackoverflow.com/a/43458449

Validations

Javid-Izadfar avatar Jan 07 '24 12:01 Javid-Izadfar

I can open a PR if you're up to this change.

Javid-Izadfar avatar Jan 07 '24 12:01 Javid-Izadfar

@Javid-Izadfar Contributions are welcome, but a more proper params name should be considered :)

Doctor-wu avatar Jan 08 '24 08:01 Doctor-wu