简体   繁体   中英

Flutter text to speech low volume on ios

In my app on ios, I am using flutter tts . It is working as expected on Android but on ios the volume is very low because the audio is coming from the earpiece(not from the speaker). Because of this, the volume is very very low. How do I switch the audio output to the speaker? Any suggestions are welcomed. Thanks in advance.

This is my code:

    await flutterTts.setSpeechRate(Platform.android == true ? 0.97 : 0.53);
    await flutterTts.speak("I am a Flutter developer");

Try:

await flutterTts.setIosAudioCategory(IosTextToSpeechAudioCategory.playback, [
  IosTextToSpeechAudioCategoryOptions.defaultToSpeaker
]);

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM