SpokenInstruction
open class SpokenInstruction : Codableextension SpokenInstruction: EquatableAn instruction about an upcoming RouteStep’s maneuver, optimized for speech synthesis.
The instruction is provided in two formats: plain text and text marked up according to the Speech Synthesis Markup Language (SSML). Use a speech synthesizer such as AVSpeechSynthesizer or Amazon Polly to read aloud the instruction.
The distanceAlongStep property is measured from the beginning of the step associated with this object. By contrast, the text and ssmlText properties refer to the details in the following step. It is also possible for the instruction to refer to two following steps simultaneously when needed for safe navigation.
- 
                  
                  Initialize a spoken instruction. DeclarationSwift public init(distanceAlongStep: CLLocationDistance, text: String, ssmlText: String)ParametersdistanceAlongStepA distance along the associated RouteStepat which to read the instruction aloud.textA plain-text representation of the speech-optimized instruction. ssmlTextA formatted representation of the speech-optimized instruction. 
- 
                  
                  A distance along the associated RouteStepat which to read the instruction aloud.The distance is measured in meters from the beginning of the associated step. DeclarationSwift public let distanceAlongStep: CLLocationDistance
- 
                  
                  A plain-text representation of the speech-optimized instruction. This representation is appropriate for speech synthesizers that lack support for the Speech Synthesis Markup Language (SSML), such as AVSpeechSynthesizer. For speech synthesizers that support SSML, use thessmlTextproperty instead.DeclarationSwift public let text: String
- 
                  
                  A formatted representation of the speech-optimized instruction. This representation is appropriate for speech synthesizers that support the Speech Synthesis Markup Language (SSML), such as Amazon Polly. Numbers and names are marked up to ensure correct pronunciation. For speech synthesizers that lack SSML support, use the textproperty instead.DeclarationSwift public let ssmlText: String
- 
                  
                  DeclarationSwift public static func == (lhs: SpokenInstruction, rhs: SpokenInstruction) -> Bool
 Install in Dash
              Install in Dash
             SpokenInstruction Class Reference
        SpokenInstruction Class Reference