[Update] 文字起こしされたメッセージをログに表示(マイクのみ + 翻訳未対応)
This commit is contained in:
@@ -43,6 +43,24 @@ export const useMessage = () => {
|
||||
}, 3000);
|
||||
},
|
||||
currentMessageLogsStatus: currentMessageLogsStatus,
|
||||
|
||||
addMessageLogsStatus: (payload) => {
|
||||
const data = payload.data;
|
||||
const message_object = {
|
||||
id: crypto.randomUUID(),
|
||||
created_at: new Date().toLocaleTimeString(
|
||||
"ja-JP",
|
||||
{hour12: false, hour: "2-digit", minute:"2-digit"},
|
||||
),
|
||||
category: "sent",
|
||||
status: "ok",
|
||||
messages : {
|
||||
original: data.message,
|
||||
translated: [],
|
||||
},
|
||||
};
|
||||
addMessageLogsStatus(message_object);
|
||||
},
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { useMainFunction } from "./useMainFunction";
|
||||
import { useConfig } from "./useConfig";
|
||||
import { useMessage } from "./useMessage";
|
||||
|
||||
export const useReceiveRoutes = () => {
|
||||
const {
|
||||
@@ -8,6 +9,8 @@ export const useReceiveRoutes = () => {
|
||||
updateTranscriptionReceiveStatus,
|
||||
} = useMainFunction();
|
||||
|
||||
const { addMessageLogsStatus } = useMessage();
|
||||
|
||||
const {
|
||||
updateSoftwareVersion,
|
||||
} = useConfig();
|
||||
@@ -21,6 +24,8 @@ export const useReceiveRoutes = () => {
|
||||
"/controller/callback_disable_transcription_receive": updateTranscriptionReceiveStatus,
|
||||
|
||||
"/config/version": updateSoftwareVersion,
|
||||
|
||||
"/action/transcription_send_mic_message": addMessageLogsStatus
|
||||
};
|
||||
|
||||
const receiveRoutes = (parsed_data) => {
|
||||
|
||||
Reference in New Issue
Block a user