[Update] Config Page: Transcription Tab. Add SelectedTranscriptionEngine.
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
import { useStore_SelectedTranscriptionEngine } from "@store";
|
||||
import { useStdoutToPython } from "@logics/useStdoutToPython";
|
||||
|
||||
export const useSelectedTranscriptionEngine = () => {
|
||||
const { asyncStdoutToPython } = useStdoutToPython();
|
||||
const { currentSelectedTranscriptionEngine, updateSelectedTranscriptionEngine, pendingSelectedTranscriptionEngine } = useStore_SelectedTranscriptionEngine();
|
||||
|
||||
const getSelectedTranscriptionEngine = () => {
|
||||
pendingSelectedTranscriptionEngine();
|
||||
asyncStdoutToPython("/get/data/selected_transcription_engine");
|
||||
};
|
||||
|
||||
const setSelectedTranscriptionEngine = (selected_transcription_engine) => {
|
||||
pendingSelectedTranscriptionEngine();
|
||||
asyncStdoutToPython("/set/data/selected_transcription_engine", selected_transcription_engine);
|
||||
};
|
||||
|
||||
return {
|
||||
currentSelectedTranscriptionEngine,
|
||||
getSelectedTranscriptionEngine,
|
||||
updateSelectedTranscriptionEngine,
|
||||
setSelectedTranscriptionEngine,
|
||||
};
|
||||
};
|
||||
Reference in New Issue
Block a user