HDVoiceMessage

public final class HDVoiceMessage extends MediaMessageContent

High-definition voice message.

Inherits MediaMessageContent. This message will store and count toward unread message count.

Inherits from MediaMessageContent properties:

  • localPath Local voice file path

  • remoteUrl Remote voice file download URL

  • name Voice file name

Constructors

Link copied to clipboard

Properties

Link copied to clipboard
private Integer duration

Voice duration (unit: seconds).

Link copied to clipboard
private String format

Audio format (e.g. "aac", "wav").

Link copied to clipboard
private Integer numberOfChannels

Number of audio channels. Only mono (1) supports STT.

Link copied to clipboard
private Integer sampleRate

Audio sample rate. Only 8000 and 16000 support STT.

Link copied to clipboard
private final SpeechToTextInfo sttInfo

Speech-to-text info, null if not converted.

Inherited properties

Link copied to clipboard
private Long destructTime

Auto-destruct duration in seconds after the message is read.

Link copied to clipboard
private String extra

Extra data attached to the message content (sent along with the message, synced remotely).

Link copied to clipboard
private Boolean isDestruct

Whether this is a burn-after-reading message.

Link copied to clipboard
private String localPath

Local file path of the media content.

Link copied to clipboard

Mention (@) info.

Link copied to clipboard
private String name

Media content file name.

Link copied to clipboard
private String remoteUrl

Remote URL of the media content after upload.

Functions

Link copied to clipboard
public final Integer getDuration()

Voice duration (unit: seconds).

Link copied to clipboard
public final String getFormat()

Audio format (e.g. "aac", "wav").

Link copied to clipboard
public final Integer getNumberOfChannels()

Number of audio channels. Only mono (1) supports STT.

Link copied to clipboard
public final Integer getSampleRate()

Audio sample rate. Only 8000 and 16000 support STT.

Link copied to clipboard

Speech-to-text info, null if not converted.

Link copied to clipboard
public final Unit setDuration(Integer duration)

Voice duration (unit: seconds).

Link copied to clipboard
public final Unit setFormat(String format)

Audio format (e.g. "aac", "wav").

Link copied to clipboard
public final Unit setNumberOfChannels(Integer numberOfChannels)

Number of audio channels. Only mono (1) supports STT.

Link copied to clipboard
public final Unit setSampleRate(Integer sampleRate)

Audio sample rate. Only 8000 and 16000 support STT.

Link copied to clipboard
public String toString()

Inherited functions

Link copied to clipboard
public final Long getDestructTime()

Auto-destruct duration in seconds after the message is read.

Link copied to clipboard
public final String getExtra()

Extra data attached to the message content (sent along with the message, synced remotely).

Link copied to clipboard
public final String getLocalPath()

Local file path of the media content.

Link copied to clipboard

Mention (@) info.

Link copied to clipboard
public final String getName()

Media content file name.

Link copied to clipboard
public final String getRemoteUrl()

Remote URL of the media content after upload.

Link copied to clipboard
public final Boolean isDestruct()

Whether this is a burn-after-reading message.

Link copied to clipboard
public final Unit setDestruct(Boolean isDestruct)

Whether this is a burn-after-reading message.

Link copied to clipboard
public final Unit setDestructTime(Long destructTime)

Auto-destruct duration in seconds after the message is read.

Link copied to clipboard
public final Unit setExtra(String extra)

Extra data attached to the message content (sent along with the message, synced remotely).

Link copied to clipboard
public final Unit setLocalPath(String localPath)

Local file path of the media content.

Link copied to clipboard
public final Unit setMentionedInfo(MentionedInfo mentionedInfo)

Mention (@) info.

Link copied to clipboard
public final Unit setName(String name)

Media content file name.

Link copied to clipboard
public final Unit setRemoteUrl(String remoteUrl)

Remote URL of the media content after upload.