Package io.rong.imkit.handler
Class SpeechToTextHandler
-
- All Implemented Interfaces:
public class SpeechToTextHandler extends MultiDataHandler
语音转文字处理器
负责处理语音消息转文字的数据请求和回调,包括:
- 发起语音转文字请求
- 设置转文字结果的可见性
- 监听转文字结果回调
- 管理转文字操作的错误状态
- Since:
5.22.0
-
-
Field Summary
Fields Modifier and Type Field Description public final static MultiDataHandler.DataKey<UiMessage>KEY_SPEECH_TO_TEXT_LISTENERpublic final static MultiDataHandler.DataKey<UiMessage>KEY_REQUEST_SPEECH_TO_TEXTpublic final static MultiDataHandler.DataKey<UiMessage>KEY_SET_SPEECH_TO_TEXT_VISIBLEpublic final static StringSPEECH_TO_TEXT_HIDDEN_STATEpublic final static StringSPEECH_TO_TEXT_LOADING_STATEprotected volatile booleanisAlive
-
Constructor Summary
Constructors Constructor Description SpeechToTextHandler()
-
Method Summary
Modifier and Type Method Description voidrequestSpeechToTextForMessage(String messageUId)voidsetMessageSpeechToTextVisible(int messageId, boolean isVisible)voidstop()结束 -
Methods inherited from class io.rong.imkit.base.BaseHandler
isAlive -
Methods inherited from class io.rong.imkit.base.MultiDataHandler
addDataChangeListener, notifyDataChange, notifyDataError, notifyDataError, notifyDataError, replaceDataChangeListener -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
requestSpeechToTextForMessage
void requestSpeechToTextForMessage(String messageUId)
-
setMessageSpeechToTextVisible
void setMessageSpeechToTextVisible(int messageId, boolean isVisible)
-
stop
void stop()
结束
-
-
-
-