Class TdApi.VoiceNote

  • Enclosing class:
    TdApi

    public static class TdApi.VoiceNote
    extends TdApi.Object
    Describes a voice note. The voice note must be encoded with the Opus codec, and stored inside an OGG container. Voice notes can have only a single audio channel.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static int CONSTRUCTOR
      Identifier uniquely determining type of the object.
      int duration
      Duration of the voice note, in seconds; as defined by the sender.
      java.lang.String mimeType
      MIME type of the file; as defined by the sender.
      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()
      Default constructor.
      VoiceNote​(int duration, byte[] waveform, java.lang.String mimeType, TdApi.File voice)
      Constructor for initialization of all fields.
    • Field Detail

      • 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 java.lang.String mimeType
        MIME type of the file; as defined by the sender.
      • 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 Detail

      • VoiceNote

        public VoiceNote()
        Default constructor.
      • VoiceNote

        public VoiceNote​(int duration,
                         byte[] waveform,
                         java.lang.String mimeType,
                         TdApi.File voice)
        Constructor for initialization of all fields.
        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.
        voice - File containing the voice note.