dlutton / flutter_tts

Flutter Text to Speech package
MIT License
617 stars 258 forks source link

Added AudioFocus and Audio Attributes For Navigation #542

Closed lucasdidur closed 1 week ago

lucasdidur commented 4 weeks ago

You can use now

 FlutterTts flutterTts = FlutterTts();

// Use Navigation channel (ex Android Auto GPS)
await flutterTts.setAudioAttributesForNavigation();

// Request audio focus (others apps get volume down when speaking)
await flutterTts.speak(text, focus: true);
dlutton commented 2 weeks ago

@lucasdidur thanks for this PR. I'm assuming this is only for Android. Do you mind updating the README and then I'll go ahead and merge it in.