prepareCustomLanguageModel(for:configuration:ignoresCache:completion:)
Creates a language model from custom training data.
Declaration
class func prepareCustomLanguageModel(for asset: URL, configuration: SFSpeechLanguageModel.Configuration, ignoresCache: Bool, completion: @escaping @Sendable ((any Error)?) -> Void)class func prepareCustomLanguageModel(for asset: URL, configuration: SFSpeechLanguageModel.Configuration, ignoresCache: Bool) async throwsParameters
- asset:
The URL of a file containing custom training data. Create this file with Export(to:).
- configuration:
An object listing the URLs at which this method should create the language model and compiled vocabulary from the training data.
- ignoresCache:
If
true, the language model identified by the configuration will be recreated even if theassetfile is unchanged. - completion:
Called when the language model has been created.