<!--
{
  "availability" : [
    "macOS: 10.5.0 - 14.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSSpeechSynthesizer/phonemes(from:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSSpeechSynthesizer(im)phonemesFromText:"
  },
  "title" : "phonemes(from:)"
}
-->

# phonemes(from:)

Provides the phoneme symbols generated by the given text.

```
func phonemes(from text: String) -> String
```

## Parameters

`text`

Text from which to generate phonemes.

## Return Value

Phonemes generated from text.

## Discussion

Converting textual data into phonetic data is particularly useful during application development, when you might wish to adjust phrases that your application generates to produce smoother speech. By first converting the target phrase into phonemes, you can see what the synthesizer will try to speak. Then you need correct only the parts that would not have been spoken the way you want

The string returned by phonemesFromText: corresponds precisely to the phonemes that would be spoken had the input text been sent to [`startSpeaking(_:)`](/documentation/AppKit/NSSpeechSynthesizer/startSpeaking(_:)) instead. All current property settings for the synthesizer are applied to the converted speech.

No delegate methods are called while [`phonemes(from:)`](/documentation/AppKit/NSSpeechSynthesizer/phonemes(from:)) method is generating its output.

---

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)