[Update] Config Page: Translation Tab. Add Internal Translation Weight Type Selector. Downloadable.

This commit is contained in:
Sakamoto Shiina
2024-11-12 13:02:05 +09:00
parent 43b061b007
commit 36c53c49a2
17 changed files with 365 additions and 139 deletions

View File

@@ -46,6 +46,8 @@ import {
useSpeakerPhraseTimeout,
useSpeakerMaxWords,
useDeepLAuthKey,
useCTranslate2WeightTypeStatus,
useSelectedCTranslate2WeightType,
useOverlaySettings,
useIsEnabledOverlaySmallLog,
useOverlaySmallLogSettings,
@@ -118,6 +120,12 @@ export const useReceiveRoutes = () => {
const { updateSpeakerMaxWords } = useSpeakerMaxWords();
const { updateDeepLAuthKey } = useDeepLAuthKey();
const { updateSelectedCTranslate2WeightType } = useSelectedCTranslate2WeightType();
const {
updateDownloadedCTranslate2WeightTypeStatus,
updateDownloadProgressCTranslate2WeightTypeStatus,
downloadedCTranslate2WeightType,
} = useCTranslate2WeightTypeStatus();
const { updateOverlaySettings } = useOverlaySettings();
const { updateOverlaySmallLogSettings } = useOverlaySmallLogSettings();
@@ -278,6 +286,14 @@ export const useReceiveRoutes = () => {
"/set/data/deepl_auth_key": updateDeepLAuthKey,
"/delete/data/deepl_auth_key": () => updateDeepLAuthKey(""),
"/get/data/ctranslate2_weight_type": updateSelectedCTranslate2WeightType,
"/set/data/ctranslate2_weight_type": updateSelectedCTranslate2WeightType,
"/get/data/selectable_ctranslate2_weight_type_dict": updateDownloadedCTranslate2WeightTypeStatus,
"/run/download_ctranslate2_weight": updateDownloadProgressCTranslate2WeightTypeStatus,
"/run/downloaded_ctranslate2_weight": downloadedCTranslate2WeightType,
// Transcription
"/get/data/mic_record_timeout": updateMicRecordTimeout,
"/set/data/mic_record_timeout": updateMicRecordTimeout,