Package ai.nexconn.chat.message
Class HDVoiceMessage
-
- All Implemented Interfaces:
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
-
-
Field Summary
Fields Modifier and Type Field Description private Integerdurationprivate IntegernumberOfChannelsprivate IntegersampleRateprivate Stringformatprivate final SpeechToTextInfosttInfoprivate StringlocalPathprivate StringremoteUrlprivate Stringnameprivate Stringextraprivate MentionedInfomentionedInfoprivate BooleanisDestructprivate LongdestructTime
-
Constructor Summary
Constructors Constructor Description HDVoiceMessage()
-
Method Summary
Modifier and Type Method Description final IntegergetDuration()Voice duration (unit: seconds). final UnitsetDuration(Integer duration)Voice duration (unit: seconds). final IntegergetNumberOfChannels()Number of audio channels. final UnitsetNumberOfChannels(Integer numberOfChannels)Number of audio channels. final IntegergetSampleRate()Audio sample rate. final UnitsetSampleRate(Integer sampleRate)Audio sample rate. final StringgetFormat()Audio format (e.g. final UnitsetFormat(String format)Audio format (e.g. final SpeechToTextInfogetSttInfo()Speech-to-text info, null if not converted. StringtoString()-
Methods inherited from class ai.nexconn.chat.message.MediaMessageContent
getLocalPath, getName, getRemoteUrl, setLocalPath, setName, setRemoteUrl -
Methods inherited from class ai.nexconn.chat.message.MessageContent
getDestructTime, getExtra, getMentionedInfo, isDestruct, setDestruct, setDestructTime, setExtra, setMentionedInfo -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
getDuration
final Integer getDuration()
Voice duration (unit: seconds).
-
setDuration
final Unit setDuration(Integer duration)
Voice duration (unit: seconds).
-
getNumberOfChannels
final Integer getNumberOfChannels()
Number of audio channels. Only mono (1) supports STT.
-
setNumberOfChannels
final Unit setNumberOfChannels(Integer numberOfChannels)
Number of audio channels. Only mono (1) supports STT.
-
getSampleRate
final Integer getSampleRate()
Audio sample rate. Only 8000 and 16000 support STT.
-
setSampleRate
final Unit setSampleRate(Integer sampleRate)
Audio sample rate. Only 8000 and 16000 support STT.
-
getFormat
final String getFormat()
Audio format (e.g. "aac", "wav").
-
getSttInfo
final SpeechToTextInfo getSttInfo()
Speech-to-text info, null if not converted.
-
toString
String toString()
-
-
-
-