mirror of
https://github.com/w-okada/voice-changer.git
synced 2025-01-23 05:25:01 +03:00
update
This commit is contained in:
parent
bc6e8a9c08
commit
2ac5ec9feb
11
client/.vscode/settings.json
vendored
Normal file
11
client/.vscode/settings.json
vendored
Normal file
@ -0,0 +1,11 @@
|
||||
{
|
||||
"workbench.colorCustomizations": {
|
||||
"tab.activeBackground": "#65952acc"
|
||||
},
|
||||
"editor.defaultFormatter": "esbenp.prettier-vscode",
|
||||
"prettier.printWidth": 1024,
|
||||
"prettier.tabWidth": 4,
|
||||
"files.associations": {
|
||||
"*.css": "postcss"
|
||||
}
|
||||
}
|
9
client/demo/.vscode/settings.json
vendored
9
client/demo/.vscode/settings.json
vendored
@ -1,8 +1,11 @@
|
||||
{
|
||||
"files.associations": {
|
||||
"*.css": "postcss"
|
||||
},
|
||||
"workbench.colorCustomizations": {
|
||||
"tab.activeBackground": "#65952acc"
|
||||
},
|
||||
"editor.defaultFormatter": "esbenp.prettier-vscode",
|
||||
"prettier.printWidth": 1024,
|
||||
"prettier.tabWidth": 4,
|
||||
"files.associations": {
|
||||
"*.css": "postcss"
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
import React from "react"
|
||||
import React from "react";
|
||||
import { GuiStateProvider } from "./001_GuiStateProvider";
|
||||
import { Dialogs } from "./900_Dialogs";
|
||||
import { ModelSlotControl } from "./b00_ModelSlotControl";
|
||||
@ -13,5 +13,5 @@ export const Demo = () => {
|
||||
<ModelSlotControl></ModelSlotControl>
|
||||
</div>
|
||||
</GuiStateProvider>
|
||||
)
|
||||
}
|
||||
);
|
||||
};
|
||||
|
5
client/lib/.vscode/settings.json
vendored
5
client/lib/.vscode/settings.json
vendored
@ -4,5 +4,8 @@
|
||||
},
|
||||
"editor.defaultFormatter": "esbenp.prettier-vscode",
|
||||
"prettier.printWidth": 1024,
|
||||
"prettier.tabWidth": 4
|
||||
"prettier.tabWidth": 4,
|
||||
"files.associations": {
|
||||
"*.css": "postcss"
|
||||
}
|
||||
}
|
||||
|
@ -15,8 +15,7 @@ export const VoiceChangerType = {
|
||||
WebModel: "WebModel",
|
||||
EasyVC: "EasyVC",
|
||||
} as const;
|
||||
export type VoiceChangerType =
|
||||
(typeof VoiceChangerType)[keyof typeof VoiceChangerType];
|
||||
export type VoiceChangerType = (typeof VoiceChangerType)[keyof typeof VoiceChangerType];
|
||||
|
||||
export const StaticModel = {
|
||||
BeatriceJVS: "Beatrice-JVS",
|
||||
@ -31,16 +30,14 @@ export const InputSampleRate = {
|
||||
"44100": 44100,
|
||||
"24000": 24000,
|
||||
} as const;
|
||||
export type InputSampleRate =
|
||||
(typeof InputSampleRate)[keyof typeof InputSampleRate];
|
||||
export type InputSampleRate = (typeof InputSampleRate)[keyof typeof InputSampleRate];
|
||||
|
||||
export const ModelSamplingRate = {
|
||||
"48000": 48000,
|
||||
"40000": 40000,
|
||||
"32000": 32000,
|
||||
} as const;
|
||||
export type ModelSamplingRate =
|
||||
(typeof InputSampleRate)[keyof typeof InputSampleRate];
|
||||
export type ModelSamplingRate = (typeof InputSampleRate)[keyof typeof InputSampleRate];
|
||||
|
||||
export const CrossFadeOverlapSize = {
|
||||
"128": 128,
|
||||
@ -50,8 +47,7 @@ export const CrossFadeOverlapSize = {
|
||||
"2048": 2048,
|
||||
"4096": 4096,
|
||||
} as const;
|
||||
export type CrossFadeOverlapSize =
|
||||
(typeof CrossFadeOverlapSize)[keyof typeof CrossFadeOverlapSize];
|
||||
export type CrossFadeOverlapSize = (typeof CrossFadeOverlapSize)[keyof typeof CrossFadeOverlapSize];
|
||||
|
||||
export const F0Detector = {
|
||||
dio: "dio",
|
||||
@ -146,8 +142,7 @@ export const ServerSettingKey = {
|
||||
inputSampleRate: "inputSampleRate",
|
||||
enableDirectML: "enableDirectML",
|
||||
} as const;
|
||||
export type ServerSettingKey =
|
||||
(typeof ServerSettingKey)[keyof typeof ServerSettingKey];
|
||||
export type ServerSettingKey = (typeof ServerSettingKey)[keyof typeof ServerSettingKey];
|
||||
|
||||
export type VoiceChangerServerSetting = {
|
||||
passThrough: boolean;
|
||||
@ -323,16 +318,7 @@ export type WebModelSlot = ModelSlot & {
|
||||
samplingRate: number;
|
||||
};
|
||||
|
||||
export type ModelSlotUnion =
|
||||
| RVCModelSlot
|
||||
| MMVCv13ModelSlot
|
||||
| MMVCv15ModelSlot
|
||||
| SoVitsSvc40ModelSlot
|
||||
| DDSPSVCModelSlot
|
||||
| DiffusionSVCModelSlot
|
||||
| BeatriceModelSlot
|
||||
| LLVCModelSlot
|
||||
| WebModelSlot;
|
||||
export type ModelSlotUnion = RVCModelSlot | MMVCv13ModelSlot | MMVCv15ModelSlot | SoVitsSvc40ModelSlot | DDSPSVCModelSlot | DiffusionSVCModelSlot | BeatriceModelSlot | LLVCModelSlot | WebModelSlot;
|
||||
|
||||
type ServerAudioDevice = {
|
||||
kind: "audioinput" | "audiooutput";
|
||||
@ -486,15 +472,13 @@ export const SendingSampleRate = {
|
||||
"44100": 44100,
|
||||
"24000": 24000,
|
||||
} as const;
|
||||
export type SendingSampleRate =
|
||||
(typeof SendingSampleRate)[keyof typeof SendingSampleRate];
|
||||
export type SendingSampleRate = (typeof SendingSampleRate)[keyof typeof SendingSampleRate];
|
||||
|
||||
export const DownSamplingMode = {
|
||||
decimate: "decimate",
|
||||
average: "average",
|
||||
} as const;
|
||||
export type DownSamplingMode =
|
||||
(typeof DownSamplingMode)[keyof typeof DownSamplingMode];
|
||||
export type DownSamplingMode = (typeof DownSamplingMode)[keyof typeof DownSamplingMode];
|
||||
|
||||
export type WorkletNodeSetting = {
|
||||
serverUrl: string;
|
||||
@ -569,11 +553,9 @@ export const VOICE_CHANGER_CLIENT_EXCEPTION = {
|
||||
ERR_SIO_INVALID_RESPONSE: "ERR_SIO_INVALID_RESPONSE",
|
||||
ERR_REST_INVALID_RESPONSE: "ERR_REST_INVALID_RESPONSE",
|
||||
ERR_MIC_STREAM_NOT_INITIALIZED: "ERR_MIC_STREAM_NOT_INITIALIZED",
|
||||
ERR_INTERNAL_AUDIO_PROCESS_CALLBACK_IS_NOT_INITIALIZED:
|
||||
"ERR_INTERNAL_AUDIO_PROCESS_CALLBACK_IS_NOT_INITIALIZED",
|
||||
ERR_INTERNAL_AUDIO_PROCESS_CALLBACK_IS_NOT_INITIALIZED: "ERR_INTERNAL_AUDIO_PROCESS_CALLBACK_IS_NOT_INITIALIZED",
|
||||
} as const;
|
||||
export type VOICE_CHANGER_CLIENT_EXCEPTION =
|
||||
(typeof VOICE_CHANGER_CLIENT_EXCEPTION)[keyof typeof VOICE_CHANGER_CLIENT_EXCEPTION];
|
||||
export type VOICE_CHANGER_CLIENT_EXCEPTION = (typeof VOICE_CHANGER_CLIENT_EXCEPTION)[keyof typeof VOICE_CHANGER_CLIENT_EXCEPTION];
|
||||
|
||||
////////////////////////////////////
|
||||
// indexedDB
|
||||
@ -582,8 +564,7 @@ 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";
|
||||
export const INDEXEDDB_KEY_MODEL_DATA = "INDEXEDDB_KEY_VOICE_CHANGER_LIB_MODEL_DATA";
|
||||
|
||||
// ONNX
|
||||
export type OnnxExporterInfo = {
|
||||
|
@ -184,8 +184,8 @@ class EasyVC(VoiceChangerModel):
|
||||
logger.info("[Voice Changer] Pipeline is not initialized.")
|
||||
raise PipelineNotInitializedException()
|
||||
|
||||
enableTimer = True
|
||||
with Timer2("infer_easyvc", enableTimer) as t:
|
||||
enableTimer = False
|
||||
with Timer2("infer-easyvc", enableTimer) as t:
|
||||
|
||||
# 処理は16Kで実施(Pitch, embed, (infer))
|
||||
receivedData = cast(
|
||||
@ -203,7 +203,7 @@ class EasyVC(VoiceChangerModel):
|
||||
|
||||
# 入力データ生成
|
||||
data = self.generate_input(receivedData, crossfade_frame, sola_search_frame, extra_frame)
|
||||
t.record("generate_input")
|
||||
t.record("generate-input")
|
||||
|
||||
audio = data[0]
|
||||
pitchf = data[1]
|
||||
|
@ -138,7 +138,7 @@ class Pipeline(object):
|
||||
# print(f"pipeline exec input, audio:{audio.shape}, pitchf:{pitchf.shape}, feature:{feature.shape}")
|
||||
# print(f"pipeline exec input, silence_front:{silence_front}, out_size:{out_size}")
|
||||
|
||||
enablePipelineTimer = True
|
||||
enablePipelineTimer = False
|
||||
with Timer2("Pipeline-Exec", enablePipelineTimer) as t: # NOQA
|
||||
# 16000のサンプリングレートで入ってきている。以降この世界は16000で処理。
|
||||
# self.t_pad = self.sr * repeat # 1秒
|
||||
|
Loading…
Reference in New Issue
Block a user