Files
VRCT/src-ui/logics/configs/transcription/useSelectableWhisperComputeDeviceList.js
Sakamoto Shiina fb2b224231 [Refactor] (Huge Refactoring) ReceiveRoutes: change the way define endpoints, hooks and methods.
Remove 'multi language translation enable/disable' related methods that is no longer in use from quite ago.
2025-06-14 03:29:22 +09:00

25 lines
1.1 KiB
JavaScript

import { useStore_SelectableWhisperComputeDeviceList } from "@store";
import { useStdoutToPython } from "@useStdoutToPython";
import { transformToIndexedArray } from "@utils";
export const useSelectableWhisperComputeDeviceList = () => {
const { asyncStdoutToPython } = useStdoutToPython();
const { currentSelectableWhisperComputeDeviceList, updateSelectableWhisperComputeDeviceList, pendingSelectableWhisperComputeDeviceList } = useStore_SelectableWhisperComputeDeviceList();
const getSelectableWhisperComputeDeviceList = () => {
pendingSelectableWhisperComputeDeviceList();
asyncStdoutToPython("/get/data/transcription_compute_device_list");
};
const updateSelectableWhisperComputeDeviceList_FromBackend = (payload) => {
updateSelectableWhisperComputeDeviceList(transformToIndexedArray(payload));
};
return {
currentSelectableWhisperComputeDeviceList,
getSelectableWhisperComputeDeviceList,
updateSelectableWhisperComputeDeviceList,
updateSelectableWhisperComputeDeviceList_FromBackend,
};
};