Skip to content

Commit

Permalink
Merge branch 'main' into feature/character-info
Browse files Browse the repository at this point in the history
  • Loading branch information
shirowanisan authored Nov 28, 2021
2 parents fc5e638 + 07ea909 commit 0d19e67
Show file tree
Hide file tree
Showing 38 changed files with 359 additions and 154 deletions.
14 changes: 5 additions & 9 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,7 @@ on:

env:
VOICEVOX_ENGINE_REPO_URL: "https://github.com/Hiroshiba/voicevox_engine"
VOICEVOX_ENGINE_VERSION: 0.8.0

# FIXME: implement build with production resources in Hiroshiba/voicevox
# Temporarily, skip uploading to GitHub Release (use Artifact instead)
SKIP_UPLOADING_RELEASE_ASSET: 1
VOICEVOX_ENGINE_VERSION: 0.9.1

jobs:
build-noengine-prepackage:
Expand Down Expand Up @@ -649,15 +645,15 @@ jobs:
df -h
- name: Upload Linux AppImage Release artifact
if: env.SKIP_UPLOADING_RELEASE_ASSET == '1' && endsWith(matrix.artifact_name, '-appimage')
if: endsWith(matrix.artifact_name, '-appimage')
uses: actions/upload-artifact@v2
with:
name: ${{ matrix.artifact_name }}-release
path: |
artifact/*.7z.*
- name: Upload Linux AppImage splitted archives to Release assets
if: env.SKIP_UPLOADING_RELEASE_ASSET != '1' && endsWith(matrix.artifact_name, '-appimage')
if: endsWith(matrix.artifact_name, '-appimage')
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -667,7 +663,7 @@ jobs:

# Windows NSIS Web
- name: Upload Windows nsis-web archives to Release assets
if: env.SKIP_UPLOADING_RELEASE_ASSET != '1' && endsWith(matrix.artifact_name, '-nsis-web')
if: endsWith(matrix.artifact_name, '-nsis-web')
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -676,7 +672,7 @@ jobs:
file: artifact/*.7z.*

- name: Upload Windows nsis-web installer to Release assets
if: env.SKIP_UPLOADING_RELEASE_ASSET != '1' && endsWith(matrix.artifact_name, '-nsis-web')
if: endsWith(matrix.artifact_name, '-nsis-web')
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
Expand Down
4 changes: 2 additions & 2 deletions docs/hotfix確認作業テンプレート.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
- [ ] リソースアップデート
- [ ] バージョン更新
- [ ] コアアップデート
- [ ] releaseにマージ
- [ ] ビルド
Expand All @@ -11,9 +13,7 @@
- [ ] releaseにマージ
- [ ] アップデート情報追加
- [ ] 使い方更新
- [ ] URLも更新
- [ ] バージョン更新
- [ ] オープンじゃないリソースのマージ
- [ ] ビルド
- [ ] Github Actionsの修正
- [ ] リリース
Expand Down
3 changes: 3 additions & 0 deletions docs/アップデート確認作業テンプレート.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
- [ ] リソースアップデート
- [ ] バージョン更新
- [ ] コアアップデート
- [ ] releaseブランチ作成
- [ ] headerのコード変更
Expand All @@ -8,6 +10,7 @@
- [ ] エンジンアップデート
- [ ] releaseブランチ作成
- [ ] バージョン更新
- [ ] ドキュメント更新
- [ ] ビルド
- [ ] Github Actionsの修正
- [ ] ライブラリのライセンス情報を変更する
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "voicevox",
"version": "0.8.2",
"version": "0.9.1",
"author": "Hiroshiba Kazuyuki",
"private": true,
"engines": {
Expand Down
Binary file added public/characters/dummy3/icons/dummy3_8.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/characters/dummy3/icons/dummy4_9.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions public/characters/dummy3/metas.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"speakerName": "dummy3",
"speakerUuid": "dummy3uuid",
"styles": [
{
"styleId": 8
}
]
}
3 changes: 3 additions & 0 deletions public/characters/dummy3/policy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
dummy3 policy

https://voicevox.hiroshiba.jp/
Binary file added public/characters/dummy3/portrait.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/characters/dummy3/portrait1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added public/characters/dummy4/icons/dummy4_9.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions public/characters/dummy4/metas.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"speakerName": "dummy4",
"speakerUuid": "dummy4uuid",
"styles": [
{
"styleId": 9
}
]
}
3 changes: 3 additions & 0 deletions public/characters/dummy4/policy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
dummy4 policy

https://voicevox.hiroshiba.jp/
Binary file added public/characters/dummy4/portrait.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
6 changes: 6 additions & 0 deletions public/howtouse.md
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,12 @@ GPU モードでよく発生する現象で、長い音声を生成するには

現状の音声合成エンジンの仕様になります。前後の無音の長さを長くすると改善することがあるのでお試しください。

### Q. バージョンアップすると表示がおかしくなった

設定がなにか問題を起こしている可能性があります。一度ソフトウェアを終了して後述のパスにある設定ファイルを消去してもう一度起動してみてください。

設定ファイルのパス:`C:\Users\(ユーザー名)\AppData\Roaming\voicevox`もしくは`voicevox-cpu`

## ご感想・ご要望・バグ報告など

ご感想・ご要望は、ぜひ Twitter にてハッシュタグ #VOICEVOX を付けてツイートしてください。(開発の励みになります。)
Expand Down
27 changes: 27 additions & 0 deletions public/updateInfos.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,31 @@
[
{
"version": "0.9.1",
"descriptions": [
"キャラクター「春日部つむぎ」「波音リツ」を追加",
"サンプリングレート変更機能を追加",
"再生デバイスの変更機能を追加",
"ショートカットキーをデフォルトに戻せるように",
"UXの向上",
"開発環境の向上",
"バグ修正"
],
"contributors": [
"aoirint",
"Hiroshiba",
"HyodaKazuaki",
"koizuka",
"madosuki",
"MT224244",
"nogino52",
"Patchethium",
"PickledChair",
"shigobu",
"takana-v",
"yamachu",
"y-chan"
]
},
{
"version": "0.8.2",
"descriptions": ["音声を1つだけ書き出せるメニューボタンを追加"],
Expand Down
43 changes: 32 additions & 11 deletions src/background.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,13 @@ log.transports.file.fileName = `${prefix}_error.log`;

const isDevelopment = process.env.NODE_ENV !== "production";

if (isDevelopment) {
app.setPath(
"userData",
path.join(app.getPath("appData"), `${app.getName()}-dev`)
);
}

let win: BrowserWindow;

// 多重起動防止
Expand Down Expand Up @@ -465,36 +472,49 @@ ipcMainHandle("GET_OSS_COMMUNITY_INFOS", () => {
return ossCommunityInfos;
});

ipcMainHandle("SHOW_AUDIO_SAVE_DIALOG", (_, { title, defaultPath }) => {
return dialog.showSaveDialogSync(win, {
ipcMainHandle("SHOW_AUDIO_SAVE_DIALOG", async (_, { title, defaultPath }) => {
const result = await dialog.showSaveDialog(win, {
title,
defaultPath,
filters: [{ name: "Wave File", extensions: ["wav"] }],
properties: ["createDirectory"],
});
return result.filePath;
});

ipcMainHandle("SHOW_OPEN_DIRECTORY_DIALOG", (_, { title }) => {
return dialog.showOpenDialogSync(win, {
ipcMainHandle("SHOW_OPEN_DIRECTORY_DIALOG", async (_, { title }) => {
const result = await dialog.showOpenDialog(win, {
title,
properties: ["openDirectory", "createDirectory"],
})?.[0];
});
if (result.canceled) {
return undefined;
}
return result.filePaths[0];
});

ipcMainHandle("SHOW_PROJECT_SAVE_DIALOG", (_, { title }) => {
return dialog.showSaveDialogSync(win, {
ipcMainHandle("SHOW_PROJECT_SAVE_DIALOG", async (_, { title }) => {
const result = await dialog.showSaveDialog(win, {
title,
filters: [{ name: "VOICEVOX Project file", extensions: ["vvproj"] }],
properties: ["showOverwriteConfirmation"],
});
if (result.canceled) {
return undefined;
}
return result.filePath;
});

ipcMainHandle("SHOW_PROJECT_LOAD_DIALOG", (_, { title }) => {
return dialog.showOpenDialogSync(win, {
ipcMainHandle("SHOW_PROJECT_LOAD_DIALOG", async (_, { title }) => {
const result = await dialog.showOpenDialog(win, {
title,
filters: [{ name: "VOICEVOX Project file", extensions: ["vvproj"] }],
properties: ["openFile"],
});
if (result.canceled) {
return undefined;
}
return result.filePaths;
});

ipcMainHandle("SHOW_INFO_DIALOG", (_, { title, message, buttons }) => {
Expand Down Expand Up @@ -692,8 +712,9 @@ ipcMainHandle("CHANGE_PIN_WINDOW", () => {
}
});

ipcMainHandle("IS_UNSET_DEFAULT_STYLE_IDS", () => {
return store.get("defaultStyleIds").length === 0;
ipcMainHandle("IS_UNSET_DEFAULT_STYLE_ID", (_, speakerUuid) => {
const defaultStyleIds = store.get("defaultStyleIds");
return !defaultStyleIds.find((style) => style.speakerUuid === speakerUuid);
});

ipcMainHandle("GET_DEFAULT_STYLE_IDS", () => {
Expand Down
112 changes: 60 additions & 52 deletions src/components/AudioCell.vue
Original file line number Diff line number Diff line change
Expand Up @@ -57,60 +57,68 @@
<div>{{ characterInfo.metas.speakerName }}</div>
</q-btn>

<q-separator vertical />

<div
class="flex items-center q-px-sm q-py-none cursor-pointer"
:class="
subMenuOpenFlags[characterIndex] && 'opened-character-item'
"
@mouseover="reassignSubMenuOpen(characterIndex)"
@mouseleave="reassignSubMenuOpen.cancel()"
>
<q-icon name="keyboard_arrow_right" color="grey-6" size="sm" />

<q-menu
no-parent-event
anchor="top end"
self="top start"
transition-show="none"
transition-hide="none"
class="character-menu"
v-model="subMenuOpenFlags[characterIndex]"
<!-- スタイルが2つ以上あるものだけ、スタイル選択ボタンを表示する-->
<template v-if="characterInfo.metas.styles.length >= 2">
<q-separator vertical />

<div
class="flex items-center q-px-sm q-py-none cursor-pointer"
:class="
subMenuOpenFlags[characterIndex] && 'opened-character-item'
"
@mouseover="reassignSubMenuOpen(characterIndex)"
@mouseleave="reassignSubMenuOpen.cancel()"
>
<q-list>
<q-item
v-for="(style, styleIndex) in characterInfo.metas.styles"
:key="styleIndex"
clickable
v-close-popup
active-class="selected-character-item"
:active="style.styleId === selectedStyle.styleId"
@click="changeStyleId(style.styleId)"
>
<q-avatar rounded size="2rem" class="q-mr-md">
<q-img
no-spinner
no-transition
:ratio="1"
:src="
'data:image/png;base64,' +
characterInfo.metas.styles[styleIndex].iconBase64
"
/>
</q-avatar>
<q-item-section v-if="style.styleName"
>{{ characterInfo.metas.speakerName }} ({{
style.styleName
}})</q-item-section
<q-icon
name="keyboard_arrow_right"
color="grey-6"
size="sm"
/>

<q-menu
no-parent-event
anchor="top end"
self="top start"
transition-show="none"
transition-hide="none"
class="character-menu"
v-model="subMenuOpenFlags[characterIndex]"
>
<q-list>
<q-item
v-for="(style, styleIndex) in characterInfo.metas
.styles"
:key="styleIndex"
clickable
v-close-popup
active-class="selected-character-item"
:active="style.styleId === selectedStyle.styleId"
@click="changeStyleId(style.styleId)"
>
<q-item-section v-else>{{
characterInfo.metas.speakerName
}}</q-item-section>
</q-item>
</q-list>
</q-menu>
</div>
<q-avatar rounded size="2rem" class="q-mr-md">
<q-img
no-spinner
no-transition
:ratio="1"
:src="
'data:image/png;base64,' +
characterInfo.metas.styles[styleIndex].iconPath
"
/>
</q-avatar>
<q-item-section v-if="style.styleName"
>{{ characterInfo.metas.speakerName }} ({{
style.styleName
}})</q-item-section
>
<q-item-section v-else>{{
characterInfo.metas.speakerName
}}</q-item-section>
</q-item>
</q-list>
</q-menu>
</div>
</template>
</q-btn-group>
</q-item>
</q-list>
Expand Down
Loading

0 comments on commit 0d19e67

Please sign in to comment.