playsInSilentModeIOS does not influence Speech.speak
See original GitHub issue🐛 Bug Report
Summary of Issue
The following API call should set the audio mode such that all audio playback is played even in iOS silent mode:
import { Audio } from 'expo-av';
...
Audio.setAudioModeAsync({
playsInSilentModeIOS: true,
})
After this, we call
import * as Speech from 'expo-speech'
...
Speech.speak(text, { language: 'en' })
Even though we have set playsInSilentModeIOS
to true
, the text-to-speech output is not played when the device is in silent mode.
Environment - output of expo diagnostics
& the platform(s) you’re targeting
Platform: iOS
expo diagnostics
:
Expo CLI 3.28.2 environment info:
System:
OS: Windows 10 10.0.18362
Binaries:
Node: 12.18.2 - C:\Program Files\nodejs\node.EXE
Yarn: 1.15.2 - C:\Program Files (x86)\Yarn\bin\yarn.CMD
npm: 6.14.5 - C:\Program Files\nodejs\npm.CMD
IDEs:
Android Studio: Version 3.3.0.0 AI-182.5107.16.33.5314842
npmPackages:
expo: ^39.0.3 => 39.0.3
react: 16.13.1 => 16.13.1
react-dom: 16.13.1 => 16.13.1
react-native: https://github.com/expo/react-native/archive/sdk-39.0.2.tar.gz => 0.63.2
react-native-web: ~0.13.7 => 0.13.14
react-navigation: ^4.1.0 => 4.4.1
Expo Workflow: bare
Reproducible Demo
https://snack.expo.io/@yolpsoftware/playsinsilentmodeios
Expected Behavior vs Actual Behavior
Expected behavior: Text-to-speech output should play in silent mode.
Actual behavior: Text-to-speech output doesn’t play in silent mode.
Note
If the expo-av
API should not have any influence on expo-speech
, then you should include a playsInSilentModeIOS
API in expo-speech
as well.
This might be relevant.
Issue Analytics
- State:
- Created 3 years ago
- Comments:14 (3 by maintainers)
Top Results From Across the Web
Expo-speech not working on some iOS devices - Stack Overflow
we can use expo-av expo library to play speech on slient mode by playsInSilentModeIOS: true. in expo text to speech is working when...
Read more >Change your VoiceOver settings on iPhone - Apple Support
Go to Settings > Accessibility > VoiceOver, then do any of the following: Adjust the speaking rate: Drag the Speaking Rate slider. Choose...
Read more >Speech - Expo Documentation
Resumes speaking previously paused speech or does nothing if there's none. This method is not available on Android. Returns.
Read more >Expo-speech not working on some iOS devices...anycodings
I was facing the same issue on my anycodings_expo workout-time app because of silent mode. Expo Solution: we can use expo-av expo library...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Still a problem.
Likely related https://github.com/expo/expo/issues/19407