Package ai.nexconn.chatui.handler
Class SpeechToTextHandler
-
- All Implemented Interfaces:
public class SpeechToTextHandlerData handler for speech-to-text operations on voice messages.
Manages:
- Initiating speech-to-text requests
- Setting the visibility of transcription results
- Listening for transcription result callbacks
- Managing error states for transcription operations
- Since:
5.22.0
-
-
Field Summary
Fields Modifier and Type Field Description public final static DataKey<UiMessage>KEY_SPEECH_TO_TEXT_LISTENERpublic final static DataKey<UiMessage>KEY_REQUEST_SPEECH_TO_TEXTpublic final static DataKey<UiMessage>KEY_SET_SPEECH_TO_TEXT_VISIBLEpublic final static StringSPEECH_TO_TEXT_HIDDEN_STATEpublic final static StringSPEECH_TO_TEXT_LOADING_STATE
-
Constructor Summary
Constructors Constructor Description SpeechToTextHandler()
-
Method Summary
Modifier and Type Method Description voidrequestSpeechToTextForMessage(String messageUId)Initiates a speech-to-text transcription request for a voice message. voidsetMessageSpeechToTextVisible(int messageId, boolean isVisible)Sets the visibility of a speech-to-text transcription result. voidstop()-
-
Method Detail
-
requestSpeechToTextForMessage
void requestSpeechToTextForMessage(String messageUId)
Initiates a speech-to-text transcription request for a voice message.
- Parameters:
messageUId- the unique message ID of the voice message to transcribe
-
setMessageSpeechToTextVisible
void setMessageSpeechToTextVisible(int messageId, boolean isVisible)
Sets the visibility of a speech-to-text transcription result.
- Parameters:
messageId- the client message IDisVisible-trueto show the transcription;falseto hide it
-
stop
void stop()
-
-
-
-