voice-changer/client/lib/src/const.ts

584 lines
15 KiB
TypeScript
Raw Normal View History

2023-01-04 20:28:36 +03:00
// (★1) chunk sizeは 128サンプル, 256byte(int16)と定義。
// (★2) 256byte(最低バッファサイズ256から間引いた個数x2byte)をchunkとして管理。
2023-01-11 21:49:22 +03:00
// 24000sample -> 1sec, 128sample(1chunk) -> 5.333msec
2023-01-11 22:52:01 +03:00
// 187.5chunk -> 1sec
2023-01-04 20:28:36 +03:00
2023-06-19 05:40:16 +03:00
export const VoiceChangerType = {
2023-09-25 07:25:07 +03:00
MMVCv15: "MMVCv15",
MMVCv13: "MMVCv13",
2023-06-19 05:40:16 +03:00
"so-vits-svc-40": "so-vits-svc-40",
"DDSP-SVC": "DDSP-SVC",
2023-09-25 07:25:07 +03:00
RVC: "RVC",
"Diffusion-SVC": "Diffusion-SVC",
Beatrice: "Beatrice",
2023-11-12 17:10:58 +03:00
LLVC: "LLVC",
WebModel: "WebModel",
2023-09-25 07:25:07 +03:00
} as const;
export type VoiceChangerType = (typeof VoiceChangerType)[keyof typeof VoiceChangerType];
2023-06-19 05:40:16 +03:00
2023-11-03 22:34:43 +03:00
export const StaticModel = {
BeatriceJVS: "Beatrice-JVS",
} as const;
export type StaticModel = (typeof StaticModel)[keyof typeof StaticModel];
///////////////////////
// サーバセッティング
///////////////////////
export const InputSampleRate = {
"48000": 48000,
2023-03-14 20:39:34 +03:00
"44100": 44100,
2023-09-25 07:25:07 +03:00
"24000": 24000,
} as const;
export type InputSampleRate = (typeof InputSampleRate)[keyof typeof InputSampleRate];
2023-04-07 22:39:04 +03:00
export const ModelSamplingRate = {
"48000": 48000,
"40000": 40000,
2023-09-25 07:25:07 +03:00
"32000": 32000,
} as const;
export type ModelSamplingRate = (typeof InputSampleRate)[keyof typeof InputSampleRate];
2023-04-07 22:39:04 +03:00
export const CrossFadeOverlapSize = {
2023-11-12 17:10:58 +03:00
"128": 128,
"256": 256,
"512": 512,
"1024": 1024,
"2048": 2048,
"4096": 4096,
2023-09-25 07:25:07 +03:00
} as const;
export type CrossFadeOverlapSize = (typeof CrossFadeOverlapSize)[keyof typeof CrossFadeOverlapSize];
2023-02-14 16:32:25 +03:00
export const F0Detector = {
2023-09-25 07:25:07 +03:00
dio: "dio",
harvest: "harvest",
crepe: "crepe",
crepe_full: "crepe_full",
crepe_tiny: "crepe_tiny",
rmvpe: "rmvpe",
rmvpe_onnx: "rmvpe_onnx",
} as const;
export type F0Detector = (typeof F0Detector)[keyof typeof F0Detector];
2023-05-13 19:04:29 +03:00
export const DiffMethod = {
2023-09-25 07:25:07 +03:00
pndm: "pndm",
2023-05-13 19:04:29 +03:00
"dpm-solver": "dpm-solver",
2023-09-25 07:25:07 +03:00
} as const;
export type DiffMethod = (typeof DiffMethod)[keyof typeof DiffMethod];
2023-02-19 13:22:00 +03:00
2023-06-19 05:40:16 +03:00
export const RVCModelType = {
2023-09-25 07:25:07 +03:00
pyTorchRVC: "pyTorchRVC",
pyTorchRVCNono: "pyTorchRVCNono",
pyTorchRVCv2: "pyTorchRVCv2",
pyTorchRVCv2Nono: "pyTorchRVCv2Nono",
pyTorchWebUI: "pyTorchWebUI",
pyTorchWebUINono: "pyTorchWebUINono",
onnxRVC: "onnxRVC",
onnxRVCNono: "onnxRVCNono",
} as const;
export type RVCModelType = (typeof RVCModelType)[keyof typeof RVCModelType];
2023-02-19 13:22:00 +03:00
export const ServerSettingKey = {
2023-09-25 07:25:07 +03:00
passThrough: "passThrough",
srcId: "srcId",
dstId: "dstId",
gpu: "gpu",
crossFadeOffsetRate: "crossFadeOffsetRate",
crossFadeEndRate: "crossFadeEndRate",
crossFadeOverlapSize: "crossFadeOverlapSize",
framework: "framework",
onnxExecutionProvider: "onnxExecutionProvider",
f0Factor: "f0Factor",
f0Detector: "f0Detector",
recordIO: "recordIO",
enableServerAudio: "enableServerAudio",
serverAudioStated: "serverAudioStated",
serverAudioSampleRate: "serverAudioSampleRate",
serverInputAudioSampleRate: "serverInputAudioSampleRate",
serverOutputAudioSampleRate: "serverOutputAudioSampleRate",
serverMonitorAudioSampleRate: "serverMonitorAudioSampleRate",
serverInputAudioBufferSize: "serverInputAudioBufferSize",
serverOutputAudioBufferSize: "serverOutputAudioBufferSize",
serverInputDeviceId: "serverInputDeviceId",
serverOutputDeviceId: "serverOutputDeviceId",
serverMonitorDeviceId: "serverMonitorDeviceId",
serverReadChunkSize: "serverReadChunkSize",
serverInputAudioGain: "serverInputAudioGain",
serverOutputAudioGain: "serverOutputAudioGain",
serverMonitorAudioGain: "serverMonitorAudioGain",
tran: "tran",
noiseScale: "noiseScale",
predictF0: "predictF0",
silentThreshold: "silentThreshold",
extraConvertSize: "extraConvertSize",
clusterInferRatio: "clusterInferRatio",
indexRatio: "indexRatio",
protect: "protect",
rvcQuality: "rvcQuality",
modelSamplingRate: "modelSamplingRate",
silenceFront: "silenceFront",
modelSlotIndex: "modelSlotIndex",
useEnhancer: "useEnhancer",
useDiff: "useDiff",
2023-05-13 19:04:29 +03:00
// "useDiffDpm": "useDiffDpm",
2023-09-25 07:25:07 +03:00
diffMethod: "diffMethod",
useDiffSilence: "useDiffSilence",
diffAcc: "diffAcc",
diffSpkId: "diffSpkId",
kStep: "kStep",
threshold: "threshold",
2023-04-07 21:11:37 +03:00
2023-09-25 07:25:07 +03:00
speedUp: "speedUp",
skipDiffusion: "skipDiffusion",
2023-09-25 07:25:07 +03:00
inputSampleRate: "inputSampleRate",
enableDirectML: "enableDirectML",
} as const;
export type ServerSettingKey = (typeof ServerSettingKey)[keyof typeof ServerSettingKey];
export type VoiceChangerServerSetting = {
2023-09-25 07:25:07 +03:00
passThrough: boolean;
srcId: number;
dstId: number;
gpu: number;
crossFadeOffsetRate: number;
crossFadeEndRate: number;
crossFadeOverlapSize: CrossFadeOverlapSize;
f0Factor: number;
f0Detector: F0Detector; // dio or harvest
recordIO: number; // 0:off, 1:on
enableServerAudio: number; // 0:off, 1:on
serverAudioStated: number; // 0:off, 1:on
serverAudioSampleRate: number;
serverInputAudioSampleRate: number;
serverOutputAudioSampleRate: number;
serverMonitorAudioSampleRate: number;
serverInputAudioBufferSize: number;
serverOutputAudioBufferSize: number;
serverInputDeviceId: number;
serverOutputDeviceId: number;
serverMonitorDeviceId: number;
serverReadChunkSize: number;
serverInputAudioGain: number;
serverOutputAudioGain: number;
serverMonitorAudioGain: number;
tran: number; // so-vits-svc
noiseScale: number; // so-vits-svc
predictF0: number; // so-vits-svc
silentThreshold: number; // so-vits-svc
extraConvertSize: number; // so-vits-svc
clusterInferRatio: number; // so-vits-svc
indexRatio: number; // RVC
protect: number; // RVC
rvcQuality: number; // 0:low, 1:high
silenceFront: number; // 0:off, 1:on
modelSamplingRate: ModelSamplingRate; // 32000,40000,48000
2023-11-03 22:34:43 +03:00
modelSlotIndex: number | StaticModel;
2023-09-25 07:25:07 +03:00
useEnhancer: number; // DDSP-SVC
useDiff: number; // DDSP-SVC
2023-05-13 19:04:29 +03:00
// useDiffDpm: number// DDSP-SVC
2023-09-25 07:25:07 +03:00
diffMethod: DiffMethod; // DDSP-SVC
useDiffSilence: number; // DDSP-SVC
diffAcc: number; // DDSP-SVC
diffSpkId: number; // DDSP-SVC
kStep: number; // DDSP-SVC
threshold: number; // DDSP-SVC
2023-04-16 15:34:00 +03:00
2023-09-25 07:25:07 +03:00
speedUp: number; // Diffusion-SVC
skipDiffusion: number; // Diffusion-SVC 0:off, 1:on
2023-07-15 12:35:11 +03:00
2023-09-25 07:25:07 +03:00
inputSampleRate: InputSampleRate;
enableDirectML: number;
};
2023-01-04 20:28:36 +03:00
type ModelSlot = {
2023-11-03 22:34:43 +03:00
slotIndex: number | StaticModel;
2023-09-25 07:25:07 +03:00
voiceChangerType: VoiceChangerType;
name: string;
description: string;
credit: string;
termsOfUseUrl: string;
iconFile: string;
speakers: { [key: number]: string };
};
2023-06-19 05:40:16 +03:00
export type RVCModelSlot = ModelSlot & {
2023-09-25 07:25:07 +03:00
modelFile: string;
indexFile: string;
defaultIndexRatio: number;
defaultProtect: number;
defaultTune: number;
modelType: RVCModelType;
embChannels: number;
f0: boolean;
samplingRate: number;
deprecated: boolean;
};
2023-06-20 21:32:18 +03:00
export type MMVCv13ModelSlot = ModelSlot & {
2023-09-25 07:25:07 +03:00
modelFile: string;
configFile: string;
srcId: number;
dstId: number;
2023-06-20 21:32:18 +03:00
2023-09-25 07:25:07 +03:00
samplingRate: number;
speakers: { [key: number]: string };
};
2023-06-20 21:32:18 +03:00
export type MMVCv15ModelSlot = ModelSlot & {
2023-09-25 07:25:07 +03:00
modelFile: string;
configFile: string;
srcId: number;
dstId: number;
f0Factor: number;
samplingRate: number;
f0: { [key: number]: number };
};
2023-06-20 21:32:18 +03:00
export type SoVitsSvc40ModelSlot = ModelSlot & {
2023-09-25 07:25:07 +03:00
modelFile: string;
configFile: string;
clusterFile: string;
dstId: number;
2023-06-20 21:32:18 +03:00
2023-09-25 07:25:07 +03:00
samplingRate: number;
2023-06-20 21:32:18 +03:00
2023-09-25 07:25:07 +03:00
defaultTune: number;
defaultClusterInferRatio: number;
noiseScale: number;
speakers: { [key: number]: string };
};
2023-06-20 21:32:18 +03:00
export type DDSPSVCModelSlot = ModelSlot & {
2023-09-25 07:25:07 +03:00
modelFile: string;
configFile: string;
diffModelFile: string;
diffConfigFile: string;
dstId: number;
samplingRate: number;
defaultTune: number;
enhancer: boolean;
diffusion: boolean;
acc: number;
kstep: number;
speakers: { [key: number]: string };
};
2023-07-15 12:35:11 +03:00
export type DiffusionSVCModelSlot = ModelSlot & {
2023-09-25 07:25:07 +03:00
modelFile: string;
dstId: number;
2023-07-15 12:35:11 +03:00
2023-09-25 07:25:07 +03:00
samplingRate: number;
2023-07-15 12:35:11 +03:00
2023-09-25 07:25:07 +03:00
defaultTune: number;
defaultKstep: number;
defaultSpeedup: number;
kStepMax: number;
nLayers: number;
nnLayers: number;
speakers: { [key: number]: string };
};
2023-08-09 10:55:59 +03:00
export type BeatriceModelSlot = ModelSlot & {
2023-09-25 07:25:07 +03:00
modelFile: string;
dstId: number;
2023-08-09 10:55:59 +03:00
2023-09-25 07:25:07 +03:00
speakers: { [key: number]: string };
};
2023-08-09 10:55:59 +03:00
2023-11-12 17:10:58 +03:00
export type LLVCModelSlot = ModelSlot & {
modelFile: string;
configFile: string;
speakers: { [key: number]: string };
};
export type WebModelSlot = ModelSlot & {
modelFile: string;
defaultTune: number;
modelType: RVCModelType;
f0: boolean;
samplingRate: number;
};
export type ModelSlotUnion = RVCModelSlot | MMVCv13ModelSlot | MMVCv15ModelSlot | SoVitsSvc40ModelSlot | DDSPSVCModelSlot | DiffusionSVCModelSlot | BeatriceModelSlot | LLVCModelSlot | WebModelSlot;
2023-06-19 05:40:16 +03:00
2023-05-06 22:18:18 +03:00
type ServerAudioDevice = {
2023-09-25 07:25:07 +03:00
kind: "audioinput" | "audiooutput";
index: number;
name: string;
hostAPI: string;
};
2023-05-06 22:18:18 +03:00
export type ServerInfo = VoiceChangerServerSetting & {
2023-06-25 10:39:18 +03:00
// コンフィグ対象外 (getInfoで取得のみ可能な情報)
2023-09-25 07:25:07 +03:00
status: string;
modelSlots: ModelSlotUnion[];
serverAudioInputDevices: ServerAudioDevice[];
serverAudioOutputDevices: ServerAudioDevice[];
sampleModels: (RVCSampleModel | DiffusionSVCSampleModel)[];
2023-06-09 13:57:08 +03:00
gpus: {
2023-09-25 07:25:07 +03:00
id: number;
name: string;
memory: number;
}[];
maxInputLength: number; // MMVCv15
2023-08-05 06:33:31 +03:00
voiceChangerParams: {
2023-09-25 07:25:07 +03:00
model_dir: string;
};
};
2023-07-21 12:25:28 +03:00
export type SampleModel = {
2023-09-25 07:25:07 +03:00
id: string;
voiceChangerType: VoiceChangerType;
lang: string;
tag: string[];
name: string;
modelUrl: string;
termsOfUseUrl: string;
icon: string;
credit: string;
description: string;
sampleRate: number;
modelType: string;
f0: boolean;
};
export type RVCSampleModel = SampleModel & {
indexUrl: string;
featureUrl: string;
};
export type DiffusionSVCSampleModel = SampleModel & {
numOfDiffLayers: number;
numOfNativeLayers: number;
maxKStep: number;
};
2023-07-21 12:25:28 +03:00
2023-04-20 11:17:43 +03:00
export const DefaultServerSetting: ServerInfo = {
2023-09-25 07:25:07 +03:00
// VC Common
2023-08-06 01:44:20 +03:00
passThrough: false,
2023-04-20 11:17:43 +03:00
inputSampleRate: 48000,
2023-02-20 22:07:43 +03:00
crossFadeOffsetRate: 0.0,
crossFadeEndRate: 1.0,
crossFadeOverlapSize: CrossFadeOverlapSize[1024],
2023-03-09 00:55:57 +03:00
recordIO: 0,
2023-05-06 22:18:18 +03:00
enableServerAudio: 0,
serverAudioStated: 0,
serverAudioSampleRate: 48000,
2023-05-06 22:18:18 +03:00
serverInputAudioSampleRate: 48000,
serverOutputAudioSampleRate: 48000,
serverMonitorAudioSampleRate: 48000,
2023-05-06 22:18:18 +03:00
serverInputAudioBufferSize: 1024 * 24,
serverOutputAudioBufferSize: 1024 * 24,
serverInputDeviceId: -1,
serverOutputDeviceId: -1,
serverMonitorDeviceId: -1,
2023-05-06 22:18:18 +03:00
serverReadChunkSize: 256,
2023-05-26 17:53:27 +03:00
serverInputAudioGain: 1.0,
serverOutputAudioGain: 1.0,
2023-08-02 23:15:05 +03:00
serverMonitorAudioGain: 1.0,
2023-03-11 02:21:16 +03:00
2023-04-20 11:17:43 +03:00
// VC Specific
srcId: 0,
dstId: 1,
2023-03-09 00:55:57 +03:00
gpu: 0,
f0Factor: 1.0,
2023-09-21 18:50:09 +03:00
f0Detector: F0Detector.rmvpe_onnx,
2023-03-09 00:55:57 +03:00
2023-03-11 02:21:16 +03:00
tran: 0,
2023-04-20 11:17:43 +03:00
noiseScale: 0,
2023-03-11 02:21:16 +03:00
predictF0: 0,
silentThreshold: 0,
extraConvertSize: 0,
clusterInferRatio: 0,
2023-03-11 02:21:16 +03:00
2023-04-07 21:11:37 +03:00
indexRatio: 0,
2023-06-01 07:28:45 +03:00
protect: 0.5,
2023-04-07 22:39:04 +03:00
rvcQuality: 0,
modelSamplingRate: 48000,
2023-04-20 11:17:43 +03:00
silenceFront: 1,
2023-04-21 09:48:12 +03:00
modelSlotIndex: 0,
2023-05-16 04:38:23 +03:00
sampleModels: [],
2023-06-09 13:57:08 +03:00
gpus: [],
2023-04-07 22:39:04 +03:00
2023-05-08 23:04:34 +03:00
useEnhancer: 0,
useDiff: 1,
2023-05-13 19:04:29 +03:00
diffMethod: "dpm-solver",
2023-05-08 23:04:34 +03:00
useDiffSilence: 0,
diffAcc: 20,
diffSpkId: 1,
kStep: 120,
threshold: -45,
2023-04-07 21:11:37 +03:00
2023-07-15 12:35:11 +03:00
speedUp: 10,
2023-08-05 22:50:42 +03:00
skipDiffusion: 1,
2023-07-15 12:35:11 +03:00
2023-05-04 17:50:52 +03:00
enableDirectML: 0,
2023-09-25 07:25:07 +03:00
//
2023-03-09 00:55:57 +03:00
status: "ok",
2023-05-06 22:18:18 +03:00
modelSlots: [],
serverAudioInputDevices: [],
serverAudioOutputDevices: [],
2023-09-25 07:25:07 +03:00
maxInputLength: 128 * 2048,
2023-08-05 06:33:31 +03:00
voiceChangerParams: {
2023-09-25 07:25:07 +03:00
model_dir: "",
},
};
2023-04-05 22:03:09 +03:00
///////////////////////
// Workletセッティング
///////////////////////
2023-01-11 22:52:01 +03:00
export type WorkletSetting = {
2023-09-25 07:25:07 +03:00
numTrancateTreshold: number;
volTrancateThreshold: number;
volTrancateLength: number;
};
2023-02-19 08:20:37 +03:00
///////////////////////
2023-02-19 20:21:51 +03:00
// Worklet Nodeセッティング
2023-02-19 08:20:37 +03:00
///////////////////////
2023-01-05 05:45:42 +03:00
export const Protocol = {
2023-09-25 07:25:07 +03:00
sio: "sio",
rest: "rest",
2023-09-27 22:19:41 +03:00
internal: "internal",
2023-09-25 07:25:07 +03:00
} as const;
export type Protocol = (typeof Protocol)[keyof typeof Protocol];
2023-01-04 20:28:36 +03:00
2023-02-19 08:20:37 +03:00
export const SendingSampleRate = {
"48000": 48000,
2023-03-14 20:39:34 +03:00
"44100": 44100,
2023-09-25 07:25:07 +03:00
"24000": 24000,
} as const;
export type SendingSampleRate = (typeof SendingSampleRate)[keyof typeof SendingSampleRate];
2023-01-04 20:28:36 +03:00
2023-02-14 16:32:25 +03:00
export const DownSamplingMode = {
2023-09-25 07:25:07 +03:00
decimate: "decimate",
average: "average",
} as const;
export type DownSamplingMode = (typeof DownSamplingMode)[keyof typeof DownSamplingMode];
2023-02-19 08:20:37 +03:00
2023-02-19 20:21:51 +03:00
export type WorkletNodeSetting = {
2023-09-25 07:25:07 +03:00
serverUrl: string;
protocol: Protocol;
sendingSampleRate: SendingSampleRate;
inputChunkNum: number;
downSamplingMode: DownSamplingMode;
};
2023-04-05 22:03:09 +03:00
2023-02-19 08:20:37 +03:00
///////////////////////
// クライアントセッティング
///////////////////////
2023-01-04 20:28:36 +03:00
export const SampleRate = {
"48000": 48000,
2023-09-25 07:25:07 +03:00
} as const;
export type SampleRate = (typeof SampleRate)[keyof typeof SampleRate];
2023-01-04 20:28:36 +03:00
2023-02-19 08:20:37 +03:00
export type VoiceChangerClientSetting = {
2023-09-25 07:25:07 +03:00
audioInput: string | MediaStream | null;
sampleRate: SampleRate; // 48000Hz
echoCancel: boolean;
noiseSuppression: boolean;
noiseSuppression2: boolean;
2023-02-19 08:20:37 +03:00
2023-09-25 07:25:07 +03:00
inputGain: number;
outputGain: number;
monitorGain: number;
2023-08-26 06:32:12 +03:00
2023-09-25 07:25:07 +03:00
passThroughConfirmationSkip: boolean;
};
2023-01-05 05:45:42 +03:00
2023-06-25 10:39:18 +03:00
///////////////////////
// Client セッティング
///////////////////////
export type ClientSetting = {
2023-09-25 07:25:07 +03:00
workletSetting: WorkletSetting;
workletNodeSetting: WorkletNodeSetting;
voiceChangerClientSetting: VoiceChangerClientSetting;
};
2023-06-25 10:39:18 +03:00
export const DefaultClientSettng: ClientSetting = {
workletSetting: {
2023-11-03 19:41:51 +03:00
// numTrancateTreshold: 512 * 2,
numTrancateTreshold: 100,
2023-06-25 10:39:18 +03:00
volTrancateThreshold: 0.0005,
2023-09-25 07:25:07 +03:00
volTrancateLength: 32,
2023-06-25 10:39:18 +03:00
},
workletNodeSetting: {
serverUrl: "",
protocol: "sio",
sendingSampleRate: 48000,
inputChunkNum: 48,
2023-09-25 07:25:07 +03:00
downSamplingMode: "average",
2023-06-25 10:39:18 +03:00
},
voiceChangerClientSetting: {
audioInput: null,
sampleRate: 48000,
echoCancel: false,
noiseSuppression: false,
noiseSuppression2: false,
inputGain: 1.0,
outputGain: 1.0,
2023-08-26 06:32:12 +03:00
monitorGain: 1.0,
2023-09-25 07:25:07 +03:00
passThroughConfirmationSkip: false,
},
};
2023-01-07 14:07:39 +03:00
2023-02-19 08:20:37 +03:00
////////////////////////////////////
// Exceptions
////////////////////////////////////
2023-01-05 05:45:42 +03:00
export const VOICE_CHANGER_CLIENT_EXCEPTION = {
ERR_SIO_CONNECT_FAILED: "ERR_SIO_CONNECT_FAILED",
ERR_SIO_INVALID_RESPONSE: "ERR_SIO_INVALID_RESPONSE",
2023-01-07 14:07:39 +03:00
ERR_REST_INVALID_RESPONSE: "ERR_REST_INVALID_RESPONSE",
2023-09-25 07:25:07 +03:00
ERR_MIC_STREAM_NOT_INITIALIZED: "ERR_MIC_STREAM_NOT_INITIALIZED",
2023-09-27 22:19:41 +03:00
ERR_INTERNAL_AUDIO_PROCESS_CALLBACK_IS_NOT_INITIALIZED: "ERR_INTERNAL_AUDIO_PROCESS_CALLBACK_IS_NOT_INITIALIZED",
2023-09-25 07:25:07 +03:00
} as const;
export type VOICE_CHANGER_CLIENT_EXCEPTION = (typeof VOICE_CHANGER_CLIENT_EXCEPTION)[keyof typeof VOICE_CHANGER_CLIENT_EXCEPTION];
2023-01-04 20:28:36 +03:00
2023-01-29 03:42:45 +03:00
////////////////////////////////////
// indexedDB
////////////////////////////////////
2023-09-25 07:25:07 +03:00
export const INDEXEDDB_DB_APP_NAME = "INDEXEDDB_KEY_VOICE_CHANGER";
export const INDEXEDDB_DB_NAME = "INDEXEDDB_KEY_VOICE_CHANGER_DB";
export const INDEXEDDB_KEY_CLIENT = "INDEXEDDB_KEY_VOICE_CHANGER_LIB_CLIENT";
export const INDEXEDDB_KEY_SERVER = "INDEXEDDB_KEY_VOICE_CHANGER_LIB_SERVER";
export const INDEXEDDB_KEY_MODEL_DATA = "INDEXEDDB_KEY_VOICE_CHANGER_LIB_MODEL_DATA";
2023-01-29 09:25:44 +03:00
2023-04-13 02:00:28 +03:00
// ONNX
export type OnnxExporterInfo = {
2023-09-25 07:25:07 +03:00
status: string;
path: string;
filename: string;
};
2023-04-21 09:48:12 +03:00
2023-04-30 20:34:01 +03:00
// Merge
export type MergeElement = {
2023-09-25 07:25:07 +03:00
slotIndex: number;
strength: number;
};
2023-04-30 20:34:01 +03:00
export type MergeModelRequest = {
2023-09-25 07:25:07 +03:00
voiceChangerType: VoiceChangerType;
command: "mix";
files: MergeElement[];
};