<!--
{
  "availability" : [
    "iOS: 17.0.0 -",
    "iPadOS: 17.0.0 -",
    "macCatalyst: 17.0.0 -",
    "macOS: 14.0.0 -",
    "tvOS: 17.0.0 -",
    "visionOS: 1.1.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Speech",
  "identifier" : "/documentation/Speech/SFCustomLanguageModelData/PhraseCountGenerator",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "Speech"
    ],
    "preciseIdentifier" : "s:6Speech25SFCustomLanguageModelDataC20PhraseCountGeneratorC"
  },
  "title" : "SFCustomLanguageModelData.PhraseCountGenerator"
}
-->

# SFCustomLanguageModelData.PhraseCountGenerator

Abstract base class defining the interface for classes that generate `PhraseCount` via an iterator.

```
class PhraseCountGenerator
```

## Topics

### Protocol requirements

[`init()`](/documentation/Speech/SFCustomLanguageModelData/PhraseCountGenerator/init())

[`class Iterator`](/documentation/Speech/SFCustomLanguageModelData/PhraseCountGenerator/Iterator)

## Relationships

### Conforms To

[`DataInsertable`](/documentation/Speech/DataInsertable)

[`Decodable`](/documentation/Swift/Decodable)

[`Equatable`](/documentation/Swift/Equatable)

[`Encodable`](/documentation/Swift/Encodable)

[`AsyncSequence`](/documentation/Swift/AsyncSequence)

[`Hashable`](/documentation/Swift/Hashable)

### Inherited By

[`TemplatePhraseCountGenerator`](/documentation/Speech/SFCustomLanguageModelData/TemplatePhraseCountGenerator)

---

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)