From ebedc3ac85117b9a644417c70694a172697f7f64 Mon Sep 17 00:00:00 2001 From: Hiroshiba Date: Mon, 7 Oct 2024 00:39:42 +0900 Subject: [PATCH] =?UTF-8?q?VOICEVOX=E3=83=87=E3=83=95=E3=82=A9=E3=83=AB?= =?UTF-8?q?=E3=83=88=E3=82=A8=E3=83=B3=E3=82=B8=E3=83=B3=E3=81=AE=E6=9B=B4?= =?UTF-8?q?=E6=96=B0=E6=83=85=E5=A0=B1=E3=81=AE=E6=A7=8B=E9=80=A0=E3=82=92?= =?UTF-8?q?=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 2 +- src/data/latestDefaultEngineInfos.json | 148 ++++++++++++------------ src/generateLatestDefaultEngineInfos.ts | 90 +++++++------- 3 files changed, 123 insertions(+), 117 deletions(-) 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, }