expo-speech in expo-task-manager (background) doesn't work

  1. expo --version: 4.13.0
  2. Platforms: Android/iOS
  3. Code:
    " …
    import * as TaskManager from ‘expo-task-manager’; //version 9.2.2
    import * as Speech from ‘expo-speech’; // version 9.2.0

    TaskManager.defineTask(LOCATION_TASK_NAME, async ({ data, error }) => {
    if (data && thingToSay) {
    Speech.speak(thingToSay);

    const subscription = Location.startLocationUpdatesAsync(LOCATION_TASK_NAME, options);
    …"

Speech.speak works perfectly when the application is in the foreground but doesn’t work in the background.

Any ideas how to make it work?

If it is not possible, do you know any other TTS module (TextToSpeech) that works in the background with expo-manager?

Thanks

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.