Expo Speech onPause and onResume are not fired when paused or resumed

Viewed 30

I set onPause and onResume callback as an option when calling Speech.speak to speak text. Although pausing and resuming speaking works totally fine, but the callbacks I give to speak function arent fired. Does anyone know there is a known issue or how to fix it?

SDK Version: ~46.0.9

Platforms(Android/iOS/web/all): iOS

"expo-speech": "~10.3.0"

I set like this:

const speak = () => {
    Speech.speak(text, {
        ...options,
        onPause: ev => console.log('PAUSED!', ev),
        onResume: ev => console.log('RESUMED! ', ev),
      })
}

// pass the above to button like
<Button title="speak" onPress={speak} />
<Button title="pause" onPress={pauseFunc} />
<Button title="resume" onPress={resumeFunc} />

Nothing is logged in console…

0 Answers
Related