From a198af1e08b720a401552816b369e5fac2afb878 Mon Sep 17 00:00:00 2001 From: Raj Nakarja Date: Thu, 13 Jun 2024 14:29:58 +0200 Subject: [PATCH] Fixed TTS audio coming out of incorrect speaker --- lib/bluetooth.dart | 2 +- lib/main.dart | 2 +- pubspec.yaml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/bluetooth.dart b/lib/bluetooth.dart index 0aad87c..3893d1a 100644 --- a/lib/bluetooth.dart +++ b/lib/bluetooth.dart @@ -479,7 +479,7 @@ class BrilliantBluetooth { timeout: const Duration(days: 365), autoConnect: Platform.isIOS ? true : false, mtu: null, - ); + ); // TODO Should wait but it throws an error on Android after some time final connectionState = await device.connectionState.firstWhere((state) => state == BluetoothConnectionState.connected || diff --git a/lib/main.dart b/lib/main.dart index 4af539c..4062c86 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -40,7 +40,7 @@ void setupAudioSession() { androidAudioAttributes: AndroidAudioAttributes( contentType: AndroidAudioContentType.speech, flags: AndroidAudioFlags.none, - usage: AndroidAudioUsage.voiceCommunication, + usage: AndroidAudioUsage.assistant, ), androidAudioFocusGainType: AndroidAudioFocusGainType.gain, androidWillPauseWhenDucked: true, diff --git a/pubspec.yaml b/pubspec.yaml index a8c402d..4b88fae 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,7 +1,7 @@ name: noa description: "A new Flutter project." publish_to: 'none' -version: 1.3.6 +version: 1.3.7 environment: sdk: '>=3.3.1 <4.0.0'