# SpeechToTextHandler

public class SpeechToTextHandler

语音转文字处理器

负责处理语音消息转文字的数据请求和回调，包括：

- 发起语音转文字请求
- 设置转文字结果的可见性
- 监听转文字结果回调
- 管理转文字操作的错误状态

#### Since

5.22.0

## Constructors

SpeechToTextHandler
Link copied to clipboard
public void SpeechToTextHandler()

## Properties

KEY_REQUEST_SPEECH_TO_TEXT
Link copied to clipboard
public final static DataKey<UiMessage> KEY_REQUEST_SPEECH_TO_TEXT
KEY_SET_SPEECH_TO_TEXT_VISIBLE
Link copied to clipboard
public final static DataKey<UiMessage> KEY_SET_SPEECH_TO_TEXT_VISIBLE
KEY_SPEECH_TO_TEXT_LISTENER
Link copied to clipboard
public final static DataKey<UiMessage> KEY_SPEECH_TO_TEXT_LISTENER
SPEECH_TO_TEXT_HIDDEN_STATE
Link copied to clipboard
public final static String SPEECH_TO_TEXT_HIDDEN_STATE
语音转文字隐藏状态标识符
SPEECH_TO_TEXT_LOADING_STATE
Link copied to clipboard
public final static String SPEECH_TO_TEXT_LOADING_STATE
语音转文字加载中状态标识符

## Functions

requestSpeechToTextForMessage
Link copied to clipboard
public void requestSpeechToTextForMessage(String messageUId)
setMessageSpeechToTextVisible
Link copied to clipboard
public void setMessageSpeechToTextVisible(int messageId, boolean isVisible)
stop
Link copied to clipboard
public void stop()