Please provide the following:
- SDK Version: 46.0.15
- Platforms(Android/iOS/web/all): native
- Add the appropriate “Tag” based on what Expo library you have a question on.
If I pass SpeechOptions to the Speech.speak()
method like:
import { Button } from 'react-native'
import * as Speech from 'expo-speech'
function ExpoSpeech({ text }) {
function handlePress() {
Speech.speak(text, { onBoundary: e => console.log('onBoundary', e) });
}
return <Button onPress={handlePress} />;
}
I get no console logs for this.
Please see this Snack for a reproducible example. Here’s what you will see for the 2 event handlers, onBoundary
and onDone
, that I pass to Speech.speack()
:
- Android -
onBoundary
never triggered,onDone
triggered 1 time - iOS - same as Android
- Web -
onBoundary
is triggered 3 times,onDone
never triggered
I noticed other related (unanswered) forum posts as well: