Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VOICEVOXデフォルトエンジンの更新情報の構造を変更 #219

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

普通にコマンドを間違えていたので修正。。

```

## 音量に関して
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"
Comment on lines 80 to +82
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nemoの情報も含めても良さそうだけど、現状デフォルトエンジンとしてNemoが導入されていないので、まあいいかなと。


/** 対応する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
Loading