Play AVSpeechUtterance in local notification (swift3)

My codes launches a local notification. I can figure out how to add a title to the notification but I can not figure out how to use a custom sound. Specifically I want to use avseechutterance to speak the variable a in my code.

     let content = UNMutableNotificationContent()

      //a goes on the line below
    content.sound =

    let a = AVSpeechUtterance(string: " Good afternoon ")

    let synthesizer = AVSpeechSynthesizer()


    a.voice = AVSpeechSynthesisVoice(language: "en-US")
    a.rate = 0.08

Hi @zalubski

I don’t think it’s possible. Custom notification sound should be an instance of the UNNotificationSound class, AVSpeechSynthesisVoice can’t help you with this.
It should look something like this:

content.sound = UNNotificationSound(named: soundName)


Thank You Sir!!!