AVSpeechSynthesizer tries to deactivate app's AVAudioSession (iOS 13 beta 5)

Seems like on iOS 13 beta 5, AVSpeechSynthesizer tries to deactivate app's active audio session few seconds after AVSpeechSynthesizer instance has been created. Anyone else seeing this issue? Following code is able to reproduce the bug.


import UIKit

import AVFoundation


class ViewController: UIViewController {

private let speechRecognizer = AVSpeechSynthesizer()

override func viewDidLoad() {

super.viewDidLoad()

// Do any additional setup after loading the view.

let audioSession = AVAudioSession.sharedInstance()

try? audioSession.setActive(true, options: [])

}

}

Replies

Yes! This is happening for me as well for my app In-Flight Assistant, and I can tell it is happening for the flight simulator Infinite Flight...will definitely report this as it is a major bug for any app that uses both sound and AVSpeechSynthesizer.

Seems like the bug has been fixed in iOS 13 beta 7!

Yes - can confirm as well, both Infinite Flight and my own app no longer have their AudioSessions shut down when using the speech synthesizer. Great news.