Skip to content

Commit

Permalink
VOICEVOXデフォルトエンジンの更新情報の構造を変更
Browse files Browse the repository at this point in the history
  • Loading branch information
Hiroshiba committed Oct 6, 2024
1 parent fb0f818 commit ebedc3a
Show file tree
Hide file tree
Showing 3 changed files with 123 additions and 117 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```

## 音量に関して
Expand Down
148 changes: 75 additions & 73 deletions src/data/latestDefaultEngineInfos.json
Original file line number Diff line number Diff line change
@@ -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
}
]
}
}
}
}
Expand Down
90 changes: 47 additions & 43 deletions src/generateLatestDefaultEngineInfos.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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) {
Expand Down Expand Up @@ -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()
Expand Down Expand Up @@ -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,
}
Expand Down

0 comments on commit ebedc3a

Please sign in to comment.