PhoneticPair
public struct PhoneticPair
PhoneticPair defines a pair of original string and its phonetic transcription.
Defines a pair of an original string and its phonetic transcription. The purpose is to provide a way to handle and process phonetic representations of strings.
The PhoneticPair struct holds an original string and its phonetic transcription.
It processes the phonetic transcription to replace unsupported IPA phonemes with ones supported
by AVSpeechSynthesizer. This is useful for text-to-speech operations where phonetic accuracy
and compatibility are required.
Important
This is a Public Preview API. It may be changed or removed at any time.-
Creates an instance of
PhoneticPair.Important
In this initialiser the following logic is implemented: It processes the value of
phoneticRepresentationinput parameter and replaces in it all IPA phonemes not supported byAVSpeechSynthesizerwith phonemes supported byAVSpeechSynthesizer. After that, it assigns processed value tophoneticRepresentation.Declaration
Swift
public init(original: String, phoneticRepresentation: String)Parameters
originaloriginal string.
phoneticRepresentationphonetic representation of the original string.
-
Original string.
Declaration
Swift
public let original: String -
Phonetic transcription of the original string.
Declaration
Swift
public let phoneticRepresentation: String
TomTom SDK for iOS (0.71.1)
PhoneticPair