Skip to content

Commit

Permalink
Merge branch 'main' into refactoring/VOICEVOX#2234
Browse files Browse the repository at this point in the history
  • Loading branch information
jdkfx authored Dec 15, 2024
2 parents 639a8b6 + 0d08b86 commit 2690ea5
Show file tree
Hide file tree
Showing 8 changed files with 71 additions and 22 deletions.
3 changes: 3 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ const tsEslintRules = {
// TODO: いずれは有効化する
"@typescript-eslint/require-await": "off",

// 比較関数無しでのsortは文字列での比較になり、ミスが起こりやすいため有効化
"@typescript-eslint/require-array-sort-compare": "error",

"@typescript-eslint/no-misused-promises": [
"error",
{
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ on:
default: false

env:
VOICEVOX_ENGINE_VERSION: 0.21.1
VOICEVOX_RESOURCE_VERSION: 0.21.1
VOICEVOX_ENGINE_VERSION: 0.22.0
VOICEVOX_RESOURCE_VERSION: 0.22.0
VOICEVOX_EDITOR_VERSION:
|- # releaseタグ名か、workflow_dispatchでのバージョン名か、999.999.999-developが入る
${{ github.event.release.tag_name || github.event.inputs.version || '999.999.999-develop' }}
Expand Down
31 changes: 31 additions & 0 deletions public/updateInfos.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,35 @@
[
{
"version": "0.22.0",
"descriptions": [
"トーク:間の長さの一括制御",
"ソング:対応モーラを追加",
"ソング:ツール選択機能",
"ソング:途中でBPMや拍子を変更可能に",
"フルスクリーンに対応",
"ショートカットキー設定ダイアログのデザインを刷新",
"UIの拡大・縮小機能",
"開発環境の向上",
"バグ修正"
],
"contributors": [
"aoirint",
"Hiroshiba",
"kebin628",
"rokujyushi",
"romot-co",
"sabonerune",
"Segu-g",
"sevenc-nanashi",
"sigprogramming",
"takana-v",
"takusea",
"tarepan",
"terapotan",
"tsunekazuomija",
"X-20A"
]
},
{
"version": "0.21.1",
"descriptions": ["キャラクター「Voidoll」を追加"],
Expand Down
2 changes: 1 addition & 1 deletion src/components/Dialog/ImportSongProjectDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ const handleImportTrack = () => {
throw new Error("project or selected track is not set");
}
// トラックをインポート
const trackIndexes = selectedTrackIndexes.value.toSorted();
const trackIndexes = selectedTrackIndexes.value.toSorted((a, b) => a - b);
if (project.value.type === "vvproj") {
void store.actions.COMMAND_IMPORT_VOICEVOX_PROJECT({
project: project.value.project,
Expand Down
3 changes: 2 additions & 1 deletion src/store/audio.ts
Original file line number Diff line number Diff line change
Expand Up @@ -570,9 +570,10 @@ export const audioStore = createPartialStore<AudioStoreTypes>({
audioKeys,
});
await actions
.INITIALIZE_ENGINE_SPEAKER({
.INITIALIZE_ENGINE_CHARACTER({
engineId,
styleId,
uiLock: true,
})
.finally(() => {
mutations.SET_AUDIO_KEYS_WITH_INITIALIZING_SPEAKER({
Expand Down
36 changes: 21 additions & 15 deletions src/store/engine.ts
Original file line number Diff line number Diff line change
Expand Up @@ -330,23 +330,29 @@ export const engineStore = createPartialStore<EngineStoreTypes>({
},
},

INITIALIZE_ENGINE_SPEAKER: {
INITIALIZE_ENGINE_CHARACTER: {
/**
* 指定した話者(スタイルID)に対してエンジン側の初期化を行い、即座に音声合成ができるようにする。
* 指定したキャラクター(スタイルID)に対してエンジン側の初期化を行い、即座に音声合成ができるようにする。
*/
async action({ actions }, { engineId, styleId }) {
await actions.ASYNC_UI_LOCK({
callback: () =>
actions
.INSTANTIATE_ENGINE_CONNECTOR({
engineId,
})
.then((instance) =>
instance.invoke("initializeSpeakerInitializeSpeakerPost")({
speaker: styleId,
}),
),
});
async action({ actions }, { engineId, styleId, uiLock }) {
const requestEngineToInitializeCharacter = () =>
actions
.INSTANTIATE_ENGINE_CONNECTOR({
engineId,
})
.then((instance) =>
instance.invoke("initializeSpeakerInitializeSpeakerPost")({
speaker: styleId,
}),
);

if (uiLock) {
await actions.ASYNC_UI_LOCK({
callback: requestEngineToInitializeCharacter,
});
} else {
await requestEngineToInitializeCharacter();
}
},
},
VALIDATE_ENGINE_DIR: {
Expand Down
6 changes: 5 additions & 1 deletion src/store/singing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -823,7 +823,11 @@ export const singingStore = createPartialStore<SingingStoreTypes>({
// 指定されたstyleIdに対して、エンジン側の初期化を行う
const isInitialized = await actions.IS_INITIALIZED_ENGINE_SPEAKER(singer);
if (!isInitialized) {
await actions.INITIALIZE_ENGINE_SPEAKER(singer);
await actions.INITIALIZE_ENGINE_CHARACTER({
engineId: singer.engineId,
styleId: singer.styleId,
uiLock: false,
});
}
},
},
Expand Down
8 changes: 6 additions & 2 deletions src/store/type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1638,8 +1638,12 @@ export type EngineStoreTypes = {
action(payload: { engineId: EngineId; styleId: StyleId }): Promise<boolean>;
};

INITIALIZE_ENGINE_SPEAKER: {
action(payload: { engineId: EngineId; styleId: StyleId }): void;
INITIALIZE_ENGINE_CHARACTER: {
action(payload: {
engineId: EngineId;
styleId: StyleId;
uiLock: boolean;
}): void;
};

VALIDATE_ENGINE_DIR: {
Expand Down

0 comments on commit 2690ea5

Please sign in to comment.