类 VoiceInstructions.Builder

java.lang.Object
ai.nextbillion.kits.directions.models.VoiceInstructions.Builder
封闭类:
VoiceInstructions

public abstract static class VoiceInstructions.Builder extends Object
This builder can be used to set the values describing the VoiceInstructions.
  • 构造器详细资料

    • Builder

      public Builder()
  • 方法详细资料

    • distanceAlongGeometry

      public abstract VoiceInstructions.Builder distanceAlongGeometry(Double distanceAlongGeometry)
      Returns the missing piece in which is needed to announce instructions at accurate times. If the user is less distance away from the maneuver than what this distanceAlongGeometry() than, the announcement should be called.
      参数:
      distanceAlongGeometry - double value representing the distance to next maneuver in unit meters
      返回:
      this builder for chaining options together
    • announcement

      public abstract VoiceInstructions.Builder announcement(String announcement)
      Provides the instruction string which was build on the server-side and can sometimes concatenate instructions together if maneuver instructions are too close to each other.
      参数:
      announcement - a string with the readable instructions ready to be read or displayed to a user
      返回:
      this builder for chaining options together
    • ssmlAnnouncement

      public abstract VoiceInstructions.Builder ssmlAnnouncement(String ssmlAnnouncement)
      Get the same instruction string you'd get from VoiceInstructions.announcement() but this one includes Speech Synthesis Markup Language which helps voice synthesiser read information more humanely.
      参数:
      ssmlAnnouncement - a string with the SSML instructions
      返回:
      this builder for chaining options together
    • build

      public abstract VoiceInstructions build()
      This uses the provided parameters set using the VoiceInstructions.Builder and creates a new instance of VoiceInstructions.
      返回:
      a new instance of Voice Instructions