File tree Expand file tree Collapse file tree 1 file changed +1
-10
lines changed
ios/Sources/TextToSpeechPlugin Expand file tree Collapse file tree 1 file changed +1
-10
lines changed Original file line number Diff line number Diff line change @@ -12,17 +12,8 @@ enum QUEUE_STRATEGY: Int {
1212
1313 override init ( ) {
1414 super. init ( )
15+ self . synthesizer. usesApplicationAudioSession = false
1516 self . synthesizer. delegate = self
16- // set session in background to avoid UI hangs.
17- queue. async {
18- do {
19- let avAudioSessionCategory : AVAudioSession . Category = . playback
20- try AVAudioSession . sharedInstance ( ) . setCategory ( avAudioSessionCategory, mode: . default, options: . duckOthers)
21- try AVAudioSession . sharedInstance ( ) . setActive ( true )
22- } catch {
23- print ( " Error setting up AVAudioSession: \( error) " )
24- }
25- }
2617 }
2718
2819 public func speechSynthesizer( _ synthesizer: AVSpeechSynthesizer , didCancel utterance: AVSpeechUtterance ) {
You can’t perform that action at this time.
0 commit comments