[Update] 文字起こしされたメッセージをログに表示(マイクのみ + 翻訳未対応)
This commit is contained in:
@@ -43,6 +43,24 @@ export const useMessage = () => {
|
|||||||
}, 3000);
|
}, 3000);
|
||||||
},
|
},
|
||||||
currentMessageLogsStatus: currentMessageLogsStatus,
|
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 { useMainFunction } from "./useMainFunction";
|
||||||
import { useConfig } from "./useConfig";
|
import { useConfig } from "./useConfig";
|
||||||
|
import { useMessage } from "./useMessage";
|
||||||
|
|
||||||
export const useReceiveRoutes = () => {
|
export const useReceiveRoutes = () => {
|
||||||
const {
|
const {
|
||||||
@@ -8,6 +9,8 @@ export const useReceiveRoutes = () => {
|
|||||||
updateTranscriptionReceiveStatus,
|
updateTranscriptionReceiveStatus,
|
||||||
} = useMainFunction();
|
} = useMainFunction();
|
||||||
|
|
||||||
|
const { addMessageLogsStatus } = useMessage();
|
||||||
|
|
||||||
const {
|
const {
|
||||||
updateSoftwareVersion,
|
updateSoftwareVersion,
|
||||||
} = useConfig();
|
} = useConfig();
|
||||||
@@ -21,6 +24,8 @@ export const useReceiveRoutes = () => {
|
|||||||
"/controller/callback_disable_transcription_receive": updateTranscriptionReceiveStatus,
|
"/controller/callback_disable_transcription_receive": updateTranscriptionReceiveStatus,
|
||||||
|
|
||||||
"/config/version": updateSoftwareVersion,
|
"/config/version": updateSoftwareVersion,
|
||||||
|
|
||||||
|
"/action/transcription_send_mic_message": addMessageLogsStatus
|
||||||
};
|
};
|
||||||
|
|
||||||
const receiveRoutes = (parsed_data) => {
|
const receiveRoutes = (parsed_data) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user