Skip to content
Discussion options

You must be logged in to vote

hi @nameless-web-master

Why this happens:
Many speech-to-text libraries (like expo-speech, react-native-voice, SpeechRecognition API) emit partial results while you speak, then a final result at the end. If you append every event result instead of only accepting final ones, you’ll get duplicate words.

How to fix:

  • Check which speech recognition library you are using.
  • Inspect your event handling:
    • Only update your state/input field when the event type is “final” (not “partial” or “interim”).
    • If updating on every result, clear the previous input before appending new text.

Example fix with react-native-voice

onSpeechResults = event => {
  // Use only event.value[0], which is the final result

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by nameless-web-master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug GitHub or a GitHub feature is not working as intended
2 participants