Package org.drinkless.tdlib

# Class TdApi.VoiceNote

java.lang.Object
org.drinkless.tdlib.TdApi.Object
org.drinkless.tdlib.TdApi.VoiceNote

Enclosing class:
  `TdApi`

public static class TdApi.VoiceNote extends TdApi.Object
Describes a voice note.

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final int`
  `CONSTRUCTOR`
  Identifier uniquely determining type of the object.
  `int`
  `duration`
  Duration of the voice note, in seconds; as defined by the sender.
  `String`
  `mimeType`
  MIME type of the file; as defined by the sender.
  `TdApi.SpeechRecognitionResult`
  `speechRecognitionResult`
  Result of speech recognition in the voice note; may be null.
  `TdApi.File`
  `voice`
  File containing the voice note.
  `byte[]`
  `waveform`
  A waveform representation of the voice note in 5-bit format.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `VoiceNote()`
  Describes a voice note.
  `VoiceNote(int duration, byte[] waveform, String mimeType, TdApi.SpeechRecognitionResult speechRecognitionResult, TdApi.File voice)`
  Describes a voice note.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `int`
  `getConstructor()`
  Returns an identifier uniquely determining type of the object.

  ### Methods inherited from class org.drinkless.tdlib.TdApi.Object

  `toString`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- ## Field Details

  - ### duration

    public int duration
    Duration of the voice note, in seconds; as defined by the sender.

  - ### waveform

    public byte[] waveform
    A waveform representation of the voice note in 5-bit format.

  - ### mimeType

    public String mimeType
    MIME type of the file; as defined by the sender. Usually, one of "audio/ogg" for Opus in an OGG container, "audio/mpeg" for an MP3 audio, or "audio/mp4" for an M4A audio.

  - ### speechRecognitionResult

    @Nullable public TdApi.SpeechRecognitionResult speechRecognitionResult
    Result of speech recognition in the voice note; may be null.

  - ### voice

    public TdApi.File voice
    File containing the voice note.

  - ### CONSTRUCTOR

    public static final int CONSTRUCTOR
    Identifier uniquely determining type of the object.
    See Also:
      - Constant Field Values

- ## Constructor Details

  - ### VoiceNote

    public VoiceNote()
    Describes a voice note.

  - ### VoiceNote

    public VoiceNote(int duration, byte[] waveform, String mimeType, TdApi.SpeechRecognitionResult speechRecognitionResult, TdApi.File voice)
    Describes a voice note.
    Parameters:
      `duration` - Duration of the voice note, in seconds; as defined by the sender.
      `waveform` - A waveform representation of the voice note in 5-bit format.
      `mimeType` - MIME type of the file; as defined by the sender. Usually, one of "audio/ogg" for Opus in an OGG container, "audio/mpeg" for an MP3 audio, or "audio/mp4" for an M4A audio.
      `speechRecognitionResult` - Result of speech recognition in the voice note; may be null.
      `voice` - File containing the voice note.

- ## Method Details

  - ### getConstructor

    public int getConstructor()
    Description copied from class: `TdApi.Object`
    Returns an identifier uniquely determining type of the object.
    Specified by:
      `getConstructor` in class `TdApi.Object`
    Returns:
      this.CONSTRUCTOR