Joshua
Joshua

Reputation: 279

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");

Upvotes: 4

Views: 1889

Answers (1)

Daniel Lutton
Daniel Lutton

Reputation: 241

Try:

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

Upvotes: 11

Related Questions