diff --git a/src/backend/common/ConfigManager.ts b/src/backend/common/ConfigManager.ts index 20a00ee282..22f5db1d28 100644 --- a/src/backend/common/ConfigManager.ts +++ b/src/backend/common/ConfigManager.ts @@ -265,6 +265,17 @@ const migrations: [string, (store: Record) => unknown][] = [ return config; }, ], + [ + ">=0.22", + (config) => { + // プリセットに文内無音倍率を追加 + const presets = config.presets as ConfigType["presets"]; + for (const preset of Object.values(presets.items)) { + if (preset == undefined) throw new Error("preset == undefined"); + preset.pauseLengthScale = 1; + } + }, + ], ]; export type Metadata = { diff --git a/src/domain/project/index.ts b/src/domain/project/index.ts index 1deb9974a7..593d81f42c 100644 --- a/src/domain/project/index.ts +++ b/src/domain/project/index.ts @@ -127,7 +127,6 @@ export const migrateProjectFileObject = async ( projectData.audioItems[audioItemsKey].query.volumeScale = 1; projectData.audioItems[audioItemsKey].query.prePhonemeLength = 0.1; projectData.audioItems[audioItemsKey].query.postPhonemeLength = 0.1; - projectData.audioItems[audioItemsKey].query.pauseLengthScale = 1; projectData.audioItems[audioItemsKey].query.outputSamplingRate = DEFAULT_SAMPLING_RATE; } @@ -303,6 +302,14 @@ export const migrateProjectFileObject = async ( projectData.song.trackOrder = Object.keys(newTracks); } + if (semver.satisfies(projectAppVersion, "<0.22.0", semverSatisfiesOptions)) { + // 文内無音倍率の追加 + for (const audioItemsKey in projectData.talk.audioItems) { + projectData.talk.audioItems[audioItemsKey].query.pauseLengthScale = 1; + console.log(projectData.talk.audioItems[audioItemsKey].query); + } + } + // Validation check // トークはvalidateTalkProjectで検証する // ソングはSET_SCOREの中の`isValidScore`関数で検証される