diff --git a/README.md b/README.md index 9f6e235a..ebbc83bb 100644 --- a/README.md +++ b/README.md @@ -69,7 +69,7 @@ curl -s "$editor_url/public/qAndA.md" > src/markdowns/qAndA.md curl -s "$editor_url/public/updateInfos.json" > src/data/updateInfos.json # デフォルトエンジンの更新情報 -npm run latestDefaultEngineInfos +npm run generateLatestDefaultEngineInfos ``` ## 音量に関して diff --git a/src/data/latestDefaultEngineInfos.json b/src/data/latestDefaultEngineInfos.json index 21f6c772..1fe7525e 100644 --- a/src/data/latestDefaultEngineInfos.json +++ b/src/data/latestDefaultEngineInfos.json @@ -1,81 +1,83 @@ { "formatVersion": 1, - "windows": { - "x64": { - "CPU": { - "version": "0.20.0", - "packages": [ - { - "url": "https://github.com/VOICEVOX/voicevox_engine/releases/download/0.20.0/voicevox_engine-windows-cpu-0.20.0.vvpp", - "name": "voicevox_engine-windows-cpu-0.20.0.vvpp", - "size": 1374659234 - } - ] - }, - "GPU/CPU": { - "version": "0.20.0", - "packages": [ - { - "url": "https://github.com/VOICEVOX/voicevox_engine/releases/download/0.20.0/voicevox_engine-windows-directml-0.20.0.vvpp", - "name": "voicevox_engine-windows-directml-0.20.0.vvpp", - "size": 1382829369 - } - ] - } - } - }, - "macos": { - "x64": { - "CPU": { - "version": "0.20.0", - "packages": [ - { - "url": "https://github.com/VOICEVOX/voicevox_engine/releases/download/0.20.0/voicevox_engine-macos-x64-0.20.0.001.vvppp", - "name": "voicevox_engine-macos-x64-0.20.0.001.vvppp", - "size": 1382766014 - } - ] + "074fc39e-678b-4c13-8916-ffca8d505d1d": { + "windows": { + "x64": { + "CPU": { + "version": "0.20.0", + "packages": [ + { + "url": "https://github.com/VOICEVOX/voicevox_engine/releases/download/0.20.0/voicevox_engine-windows-cpu-0.20.0.vvpp", + "name": "voicevox_engine-windows-cpu-0.20.0.vvpp", + "size": 1374659234 + } + ] + }, + "GPU/CPU": { + "version": "0.20.0", + "packages": [ + { + "url": "https://github.com/VOICEVOX/voicevox_engine/releases/download/0.20.0/voicevox_engine-windows-directml-0.20.0.vvpp", + "name": "voicevox_engine-windows-directml-0.20.0.vvpp", + "size": 1382829369 + } + ] + } } }, - "arm64": { - "CPU": { - "version": "0.20.0", - "packages": [ - { - "url": "https://github.com/VOICEVOX/voicevox_engine/releases/download/0.20.0/voicevox_engine-macos-arm64-0.20.0.001.vvppp", - "name": "voicevox_engine-macos-arm64-0.20.0.001.vvppp", - "size": 1375008115 - } - ] - } - } - }, - "linux": { - "x64": { - "CPU": { - "version": "0.20.0", - "packages": [ - { - "url": "https://github.com/VOICEVOX/voicevox_engine/releases/download/0.20.0/voicevox_engine-linux-cpu-0.20.0.vvpp", - "name": "voicevox_engine-linux-cpu-0.20.0.vvpp", - "size": 1399437028 - } - ] + "macos": { + "x64": { + "CPU": { + "version": "0.20.0", + "packages": [ + { + "url": "https://github.com/VOICEVOX/voicevox_engine/releases/download/0.20.0/voicevox_engine-macos-x64-0.20.0.001.vvppp", + "name": "voicevox_engine-macos-x64-0.20.0.001.vvppp", + "size": 1382766014 + } + ] + } }, - "GPU/CPU": { - "version": "0.20.0", - "packages": [ - { - "url": "https://github.com/VOICEVOX/voicevox_engine/releases/download/0.20.0/voicevox_engine-linux-nvidia-0.20.0.001.vvppp", - "name": "voicevox_engine-linux-nvidia-0.20.0.001.vvppp", - "size": 1992294400 - }, - { - "url": "https://github.com/VOICEVOX/voicevox_engine/releases/download/0.20.0/voicevox_engine-linux-nvidia-0.20.0.002.vvppp", - "name": "voicevox_engine-linux-nvidia-0.20.0.002.vvppp", - "size": 645130316 - } - ] + "arm64": { + "CPU": { + "version": "0.20.0", + "packages": [ + { + "url": "https://github.com/VOICEVOX/voicevox_engine/releases/download/0.20.0/voicevox_engine-macos-arm64-0.20.0.001.vvppp", + "name": "voicevox_engine-macos-arm64-0.20.0.001.vvppp", + "size": 1375008115 + } + ] + } + } + }, + "linux": { + "x64": { + "CPU": { + "version": "0.20.0", + "packages": [ + { + "url": "https://github.com/VOICEVOX/voicevox_engine/releases/download/0.20.0/voicevox_engine-linux-cpu-0.20.0.vvpp", + "name": "voicevox_engine-linux-cpu-0.20.0.vvpp", + "size": 1399437028 + } + ] + }, + "GPU/CPU": { + "version": "0.20.0", + "packages": [ + { + "url": "https://github.com/VOICEVOX/voicevox_engine/releases/download/0.20.0/voicevox_engine-linux-nvidia-0.20.0.001.vvppp", + "name": "voicevox_engine-linux-nvidia-0.20.0.001.vvppp", + "size": 1992294400 + }, + { + "url": "https://github.com/VOICEVOX/voicevox_engine/releases/download/0.20.0/voicevox_engine-linux-nvidia-0.20.0.002.vvppp", + "name": "voicevox_engine-linux-nvidia-0.20.0.002.vvppp", + "size": 645130316 + } + ] + } } } } diff --git a/src/generateLatestDefaultEngineInfos.ts b/src/generateLatestDefaultEngineInfos.ts index 5535e93a..cb8ebae1 100644 --- a/src/generateLatestDefaultEngineInfos.ts +++ b/src/generateLatestDefaultEngineInfos.ts @@ -12,52 +12,54 @@ jsonファイルの形式は以下の通り //[number] ファイル構造バージョン(仕様変更毎にインクリメントされる) "formatVersion": 1, - // Windowsの情報 - "windows": { - "x64": { - "CPU": { - //[string] バージョン - "version": "x.x.x", - - // vvppやvvpppの情報 - "packages": [ - { - //[string] ダウンロードURL - "url": "https://example.com/", - - //[string] ファイル名 - "name": "example.vvpp", - - //[number] バイト数 - "size": 123456, - - //[string(Optional)] ハッシュ値 - "hash": "xxxxxxx", - }, - //... - ] - }, - "GPU/CPU": {} - } - }, + // エンジンの情報 + "00000000-0000-0000-0000-000000000001": { + // Windowsの情報 + "windows": { + "x64": { + "CPU": { + //[string] バージョン + "version": "x.x.x", + + // vvppやvvpppの情報 + "packages": [ + { + //[string] ダウンロードURL + "url": "https://example.com/", + + //[string] ファイル名 + "name": "example.vvpp", + + //[number] バイト数 + "size": 123456, + + //[string(Optional)] ハッシュ値 + "hash": "xxxxxxx", + }, + //... + ] + }, + "GPU/CPU": {} + } + }, - "macos": { - "x64": { - "CPU": {} + "macos": { + "x64": { + "CPU": {} + }, + "arm64": { + "CPU": {} + } }, - "arm64": { - "CPU": {} - } - }, - "linux": { - "x64": { - "CPU": {}, - "GPU/CPU": {} + "linux": { + "x64": { + "CPU": {}, + "GPU/CPU": {} + } } } } - */ import fs from "fs" @@ -77,6 +79,7 @@ const argv = yargs(hideBin(process.argv)) const GITHUB_RELEASES_URL = "https://api.github.com/repos/VOICEVOX/voicevox_engine/releases" +const ENGINE_ID = "074fc39e-678b-4c13-8916-ffca8d505d1d" /** 対応するvvpp.txtの名前 */ function getVvppTxtName(version: string) { @@ -107,6 +110,7 @@ function getVvppTxtName(version: string) { async function main() { const output = { formatVersion: 1, + [ENGINE_ID]: {}, } let releases = await (await fetch(GITHUB_RELEASES_URL)).json() @@ -168,9 +172,9 @@ async function main() { }) // 記録 - output[os] = output[os] || {} - output[os][arch] = output[os][arch] || {} - output[os][arch][device] = { + output[ENGINE_ID][os] = output[ENGINE_ID][os] || {} + output[ENGINE_ID][os][arch] = output[ENGINE_ID][os][arch] || {} + output[ENGINE_ID][os][arch][device] = { version, packages, }