Emit different text and sound when each of three buttons is pressed
Slightly modified (using array):

var appearingInPhoto = ["omar", "john", "thomas"]

@IBAction func buttonPressed(_ sender: UIButton) {

    guard let soundName = sender.currentTitle else {
        return
    }
    if appearingInPhoto.contains(soundName) {
        print("pressed \(soundName)")
        label.text = soundName
        playSoundFile(soundName)
    }

}