Skip to content

Commit ed93bcc

Browse files
feat: Translate voice input to text and append it.(#6212)
1 parent d5206d8 commit ed93bcc

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

  • ui/src/components/ai-chat/component/chat-input-operate

ui/src/components/ai-chat/component/chat-input-operate/index.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -804,7 +804,8 @@ const uploadRecording = async (audioBlob: Blob) => {
804804
}
805805
speechToTextAPI(props.applicationDetails.id as string, formData, speechLoading)
806806
.then((response) => {
807-
inputValue.value = typeof response.data === 'string' ? response.data : ''
807+
const newText = typeof response.data === 'string' ? response.data : ''
808+
inputValue.value = inputValue.value ? `${inputValue.value} ${newText}` : newText
808809
// 自动发送
809810
if (props.applicationDetails.stt_autosend) {
810811
nextTick(() => {

0 commit comments

Comments
 (0)