Package ai.nexconn.chatui.manager
Class AudioRecordManager
-
- All Implemented Interfaces:
public class AudioRecordManager
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public enumAudioRecordManager.SamplingRateVoice message sampling rate
-
Method Summary
Modifier and Type Method Description static AudioRecordManagergetInstance()final booleanhandleMessage(Message msg)intgetMaxVoiceDuration()voidsetMaxVoiceDuration(int maxVoiceDuration)The protocol stack supports a default max message size of 128K; exceeding this limit may cause socket disconnection. voidstartRecord(View rootView, ChannelIdentifier conversationIdentifier)voidwillCancelRecord()voidcontinueRecord()voidstopRecord()voiddestroyRecord()intgetSamplingRate()Voice message sampling rate voidsetSamplingRate(AudioRecordManager.SamplingRate sampleRate)Sets the voice message sampling rate -
-
Method Detail
-
getInstance
static AudioRecordManager getInstance()
-
handleMessage
final boolean handleMessage(Message msg)
-
getMaxVoiceDuration
int getMaxVoiceDuration()
-
setMaxVoiceDuration
void setMaxVoiceDuration(int maxVoiceDuration)
The protocol stack supports a default max message size of 128K; exceeding this limit may cause socket disconnection. Normal voice messages longer than 60s exceed the size limit, causing disconnection. To avoid these issues, this API is uniformly deprecated.
- Parameters:
maxVoiceDuration- maximum voice duration.
-
startRecord
void startRecord(View rootView, ChannelIdentifier conversationIdentifier)
-
willCancelRecord
void willCancelRecord()
-
continueRecord
void continueRecord()
-
stopRecord
void stopRecord()
-
destroyRecord
void destroyRecord()
-
getSamplingRate
int getSamplingRate()
Voice message sampling rate
- Returns:
the currently configured voice sampling rate
-
setSamplingRate
void setSamplingRate(AudioRecordManager.SamplingRate sampleRate)
Sets the voice message sampling rate
- Parameters:
sampleRate- the message sampling rate SamplingRate
-
-
-
-