[Update] Config Page: Translation, Transcription Tab. Add Select CTranslate2/Whisper Compute Device section.
This commit is contained in:
@@ -35,9 +35,13 @@ export { useSpeakerMaxWords } from "./transcription/useSpeakerMaxWords";
|
||||
export { useSelectedTranscriptionEngine } from "./transcription/useSelectedTranscriptionEngine";
|
||||
export { useWhisperWeightTypeStatus } from "./transcription/useWhisperWeightTypeStatus";
|
||||
export { useSelectedWhisperWeightType } from "./transcription/useSelectedWhisperWeightType";
|
||||
export { useSelectableWhisperComputeDeviceList } from "./transcription/useSelectableWhisperComputeDeviceList";
|
||||
export { useSelectedWhisperComputeDevice } from "./transcription/useSelectedWhisperComputeDevice";
|
||||
|
||||
export { useDeepLAuthKey } from "./translation/useDeepLAuthKey";
|
||||
export { useCTranslate2WeightTypeStatus } from "./translation/useCTranslate2WeightTypeStatus";
|
||||
export { useSelectableCTranslate2ComputeDeviceList } from "./translation/useSelectableCTranslate2ComputeDeviceList";
|
||||
export { useSelectedCTranslate2ComputeDevice } from "./translation/useSelectedCTranslate2ComputeDevice";
|
||||
export { useSelectedCTranslate2WeightType } from "./translation/useSelectedCTranslate2WeightType";
|
||||
|
||||
export { useIsEnabledOverlaySmallLog } from "./vr/useIsEnabledOverlaySmallLog";
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
import { useStore_SelectableWhisperComputeDeviceList } from "@store";
|
||||
import { useStdoutToPython } from "@logics/useStdoutToPython";
|
||||
|
||||
export const useSelectableWhisperComputeDeviceList = () => {
|
||||
const { asyncStdoutToPython } = useStdoutToPython();
|
||||
const { currentSelectableWhisperComputeDeviceList, updateSelectableWhisperComputeDeviceList, pendingSelectableWhisperComputeDeviceList } = useStore_SelectableWhisperComputeDeviceList();
|
||||
|
||||
const getSelectableWhisperComputeDeviceList = () => {
|
||||
pendingSelectableWhisperComputeDeviceList();
|
||||
asyncStdoutToPython("/get/data/transcription_compute_device_list");
|
||||
};
|
||||
|
||||
return {
|
||||
currentSelectableWhisperComputeDeviceList,
|
||||
getSelectableWhisperComputeDeviceList,
|
||||
updateSelectableWhisperComputeDeviceList,
|
||||
};
|
||||
};
|
||||
@@ -0,0 +1,24 @@
|
||||
import { useStore_SelectedWhisperComputeDevice } from "@store";
|
||||
import { useStdoutToPython } from "@logics/useStdoutToPython";
|
||||
|
||||
export const useSelectedWhisperComputeDevice = () => {
|
||||
const { asyncStdoutToPython } = useStdoutToPython();
|
||||
const { currentSelectedWhisperComputeDevice, updateSelectedWhisperComputeDevice, pendingSelectedWhisperComputeDevice } = useStore_SelectedWhisperComputeDevice();
|
||||
|
||||
const getSelectedWhisperComputeDevice = () => {
|
||||
pendingSelectedWhisperComputeDevice();
|
||||
asyncStdoutToPython("/get/data/selected_transcription_compute_device");
|
||||
};
|
||||
|
||||
const setSelectedWhisperComputeDevice = (selected_transcription_compute_device) => {
|
||||
pendingSelectedWhisperComputeDevice();
|
||||
asyncStdoutToPython("/set/data/selected_transcription_compute_device", selected_transcription_compute_device);
|
||||
};
|
||||
|
||||
return {
|
||||
currentSelectedWhisperComputeDevice,
|
||||
getSelectedWhisperComputeDevice,
|
||||
updateSelectedWhisperComputeDevice,
|
||||
setSelectedWhisperComputeDevice,
|
||||
};
|
||||
};
|
||||
@@ -0,0 +1,18 @@
|
||||
import { useStore_SelectableCTranslate2ComputeDeviceList } from "@store";
|
||||
import { useStdoutToPython } from "@logics/useStdoutToPython";
|
||||
|
||||
export const useSelectableCTranslate2ComputeDeviceList = () => {
|
||||
const { asyncStdoutToPython } = useStdoutToPython();
|
||||
const { currentSelectableCTranslate2ComputeDeviceList, updateSelectableCTranslate2ComputeDeviceList, pendingSelectableCTranslate2ComputeDeviceList } = useStore_SelectableCTranslate2ComputeDeviceList();
|
||||
|
||||
const getSelectableCTranslate2ComputeDeviceList = () => {
|
||||
pendingSelectableCTranslate2ComputeDeviceList();
|
||||
asyncStdoutToPython("/get/data/translation_compute_device_list");
|
||||
};
|
||||
|
||||
return {
|
||||
currentSelectableCTranslate2ComputeDeviceList,
|
||||
getSelectableCTranslate2ComputeDeviceList,
|
||||
updateSelectableCTranslate2ComputeDeviceList,
|
||||
};
|
||||
};
|
||||
@@ -0,0 +1,24 @@
|
||||
import { useStore_SelectedCTranslate2ComputeDevice } from "@store";
|
||||
import { useStdoutToPython } from "@logics/useStdoutToPython";
|
||||
|
||||
export const useSelectedCTranslate2ComputeDevice = () => {
|
||||
const { asyncStdoutToPython } = useStdoutToPython();
|
||||
const { currentSelectedCTranslate2ComputeDevice, updateSelectedCTranslate2ComputeDevice, pendingSelectedCTranslate2ComputeDevice } = useStore_SelectedCTranslate2ComputeDevice();
|
||||
|
||||
const getSelectedCTranslate2ComputeDevice = () => {
|
||||
pendingSelectedCTranslate2ComputeDevice();
|
||||
asyncStdoutToPython("/get/data/selected_translation_compute_device");
|
||||
};
|
||||
|
||||
const setSelectedCTranslate2ComputeDevice = (selected_translation_compute_device) => {
|
||||
pendingSelectedCTranslate2ComputeDevice();
|
||||
asyncStdoutToPython("/set/data/selected_translation_compute_device", selected_translation_compute_device);
|
||||
};
|
||||
|
||||
return {
|
||||
currentSelectedCTranslate2ComputeDevice,
|
||||
getSelectedCTranslate2ComputeDevice,
|
||||
updateSelectedCTranslate2ComputeDevice,
|
||||
setSelectedCTranslate2ComputeDevice,
|
||||
};
|
||||
};
|
||||
Reference in New Issue
Block a user