Record Class SpeechModelInfo

java.lang.Object
java.lang.Record
fr.dreamin.dreamvoice.api.speech.model.SpeechModelInfo
Record Components:
id - unique identifier / folder name (e.g. "vosk-model-small-fr-0.22")
language - language ISO code (e.g. "fr", "en", "de")
displayName - human-readable name of the model
downloadUrl - direct HTTP(S) URL to the model zip archive
sizeMb - approximate download size in megabytes

public record SpeechModelInfo(@NotNull String id, @NotNull String language, @NotNull String displayName, @NotNull String downloadUrl, int sizeMb) extends Record
Metadata record describing a downloadable or installed speech recognition model.
  • Constructor Details

    • SpeechModelInfo

      public SpeechModelInfo(@NotNull @NotNull String id, @NotNull @NotNull String language, @NotNull @NotNull String displayName, @NotNull @NotNull String downloadUrl, int sizeMb)
      Creates an instance of a SpeechModelInfo record class.
      Parameters:
      id - the value for the id record component
      language - the value for the language record component
      displayName - the value for the displayName record component
      downloadUrl - the value for the downloadUrl record component
      sizeMb - the value for the sizeMb record component
  • Method Details

    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with the compare method from their corresponding wrapper classes.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • id

      @NotNull public @NotNull String id()
      Returns the value of the id record component.
      Returns:
      the value of the id record component
    • language

      @NotNull public @NotNull String language()
      Returns the value of the language record component.
      Returns:
      the value of the language record component
    • displayName

      @NotNull public @NotNull String displayName()
      Returns the value of the displayName record component.
      Returns:
      the value of the displayName record component
    • downloadUrl

      @NotNull public @NotNull String downloadUrl()
      Returns the value of the downloadUrl record component.
      Returns:
      the value of the downloadUrl record component
    • sizeMb

      public int sizeMb()
      Returns the value of the sizeMb record component.
      Returns:
      the value of the sizeMb record component