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: [])
}
}