mirror of
https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
synced 2025-11-14 05:03:43 +08:00
feat: #226
This commit is contained in:
@@ -5,6 +5,8 @@ import {
|
||||
DEFAULT_INPUT_TEMPLATE,
|
||||
DEFAULT_MODELS,
|
||||
DEFAULT_SIDEBAR_WIDTH,
|
||||
DEFAULT_STT_ENGINE,
|
||||
DEFAULT_STT_ENGINES,
|
||||
DEFAULT_TTS_MODEL,
|
||||
DEFAULT_TTS_MODELS,
|
||||
DEFAULT_TTS_VOICE,
|
||||
@@ -17,6 +19,8 @@ export type ModelType = (typeof DEFAULT_MODELS)[number]["name"];
|
||||
export type TTSModelType = (typeof DEFAULT_TTS_MODELS)[number];
|
||||
export type TTSVoiceType = (typeof DEFAULT_TTS_VOICES)[number];
|
||||
|
||||
export type STTEngineType = (typeof DEFAULT_STT_ENGINES)[number];
|
||||
|
||||
export enum SubmitKey {
|
||||
Enter = "Enter",
|
||||
CtrlEnter = "Ctrl + Enter",
|
||||
@@ -81,6 +85,7 @@ export const DEFAULT_CONFIG = {
|
||||
|
||||
sttConfig: {
|
||||
enable: false,
|
||||
engine: DEFAULT_STT_ENGINE,
|
||||
},
|
||||
};
|
||||
|
||||
@@ -116,6 +121,12 @@ export const TTSConfigValidator = {
|
||||
},
|
||||
};
|
||||
|
||||
export const STTConfigValidator = {
|
||||
engine(x: string) {
|
||||
return x as STTEngineType;
|
||||
},
|
||||
};
|
||||
|
||||
export const ModalConfigValidator = {
|
||||
model(x: string) {
|
||||
return x as ModelType;
|
||||
|
||||
Reference in New Issue
Block a user