<!--
{
  "availability" : [
    "macOS: 10.3.0 - 14.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSSpeechSynthesizerDelegate/speechSynthesizer(_:willSpeakPhoneme:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(pl)NSSpeechSynthesizerDelegate(im)speechSynthesizer:willSpeakPhoneme:"
  },
  "title" : "speechSynthesizer(_:willSpeakPhoneme:)"
}
-->

# speechSynthesizer(_:willSpeakPhoneme:)

Sent just before a synthesized phoneme is spoken through the sound output device.

```
@MainActor optional func speechSynthesizer(_ sender: NSSpeechSynthesizer, willSpeakPhoneme phonemeOpcode: Int16)
```

## Parameters

`sender`

An [`NSSpeechSynthesizer`](/documentation/AppKit/NSSpeechSynthesizer) object that’s synthesizing text into speech.

`phonemeOpcode`

Phoneme that `sender` is about to speak into the sound output device.

## Discussion

One use of this method might be to animate a mouth on screen to match the generated speech.

### Special Considerations

This method is not sent for modern voices. It is only supported for MacinTalk voices.

In OS X v10.4 and earlier, the delegate is not sent this message when the `NSSpeechSynthesizer` object is synthesizing speech to a file ([`startSpeaking(_:to:)`](/documentation/AppKit/NSSpeechSynthesizer/startSpeaking(_:to:))).

## See Also

[`func startSpeaking(String) -> Bool`](/documentation/AppKit/NSSpeechSynthesizer/startSpeaking(_:))

Begins speaking synthesized text through the system’s default sound output device.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)