muhaos / react-native-speech-to-text-ios

React Native speech recognition component for iOS 10+
MIT License
40 stars 9 forks source link

Reset transcription on finish #14

Closed zachgibson closed 6 years ago

zachgibson commented 6 years ago

Is there a way to clear formattedString? I’m attempting to utter a phrase, capture formattedString, then repeat this with a new string, but without concatenating to the existing string.

muhaos commented 6 years ago

There are two ways: finish current recognition task and start a new one. Or just keep track of the last content of formattedString and make substring from current formattedString minus previous formattedString content.

zachgibson commented 6 years ago

Cool, thanks @muhaos