From a736cbaa55dbf67b2644353f01d21aa9dec3c0bc Mon Sep 17 00:00:00 2001 From: sevenc-nanashi Date: Sat, 17 Sep 2022 22:50:24 +0900 Subject: [PATCH 1/5] =?UTF-8?q?Add:=20=E3=82=A8=E3=83=B3=E3=82=B8=E3=83=B3?= =?UTF-8?q?=E3=81=AE=E3=82=A2=E3=82=A4=E3=82=B3=E3=83=B3=E3=82=92=E3=82=AD?= =?UTF-8?q?=E3=83=A3=E3=83=A9=E3=82=A2=E3=82=A4=E3=82=B3=E3=83=B3=E3=81=AE?= =?UTF-8?q?=E8=BF=91=E3=81=8F=E3=81=AB=E8=A1=A8=E7=A4=BA=E3=81=99=E3=82=8B?= =?UTF-8?q?=E3=82=88=E3=81=86=E3=81=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/AudioCell.vue | 47 ++++++++++++++++++++++++++++++++++++ src/store/audio.ts | 1 + src/type/preload.ts | 1 + 3 files changed, 49 insertions(+) diff --git a/src/components/AudioCell.vue b/src/components/AudioCell.vue index be63f3063b..c3d42711fd 100644 --- a/src/components/AudioCell.vue +++ b/src/components/AudioCell.vue @@ -58,6 +58,15 @@ getDefaultStyle(characterInfo.metas.speakerUuid).iconPath " /> + + +
{{ characterInfo.metas.speakerName }}
@@ -114,6 +123,17 @@ characterInfo.metas.styles[styleIndex].iconPath " /> + + + {{ characterInfo.metas.speakerName }} ({{ @@ -433,6 +453,9 @@ export default defineComponent({ textfield.value.focus(); }; + // 複数エンジン + const isMultipleEngine = computed(() => store.state.engineIds.length > 1); + return { userOrderedCharacterInfos, isInitializingSpeaker, @@ -447,6 +470,8 @@ export default defineComponent({ reassignSubMenuOpen, isActiveAudioCell, audioTextBuffer, + isMultipleEngine, + engineInfos: store.state.engineInfos, setAudioTextBuffer, pushAudioText, changeStyleId, @@ -562,5 +587,27 @@ export default defineComponent({ .opened-character-item { background-color: rgba(colors.$primary-rgb, 0.2); } + .engine-name { + // position: absolute; + // left: 4px; + // bottom: 0; + margin-top: auto; + margin-left: auto; + padding-left: 8px; + text-align: right; + opacity: 67%; + font-size: 0.67rem; + } + .engine-icon { + position: absolute; + bottom: 0; + right: 0; + transform: translate(50%, 50%); + + :deep(img) { + width: 27.5% !important; + height: 27.5% !important; + } + } } diff --git a/src/store/audio.ts b/src/store/audio.ts index 1502216992..a09696b595 100644 --- a/src/store/audio.ts +++ b/src/store/audio.ts @@ -666,6 +666,7 @@ export const audioStore: VoiceVoxStoreOptions< const styles = getStyles(speaker, speakerInfo); const characterInfo: CharacterInfo = { portraitPath: base64ToUrl(speakerInfo.portrait, "image/png"), + engineId, metas: { speakerUuid: speaker.speakerUuid, speakerName: speaker.name, diff --git a/src/type/preload.ts b/src/type/preload.ts index d09fbb5a2b..f60b8adcde 100644 --- a/src/type/preload.ts +++ b/src/type/preload.ts @@ -117,6 +117,7 @@ export type MetasJson = { export type CharacterInfo = { portraitPath: string; + engineId: string; metas: { speakerUuid: string; speakerName: string; From 9145d1a26e08f607f5a5db7e7465a0e1a969b1d8 Mon Sep 17 00:00:00 2001 From: sevenc-nanashi Date: Sat, 17 Sep 2022 23:24:41 +0900 Subject: [PATCH 2/5] =?UTF-8?q?Change:=20StyleInfo=E3=81=ABengineId?= =?UTF-8?q?=E3=82=92=E6=8C=81=E3=81=9F=E3=81=9B=E3=82=8B=E3=82=88=E3=81=86?= =?UTF-8?q?=E3=81=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/AudioCell.vue | 14 ++++++++++++-- src/store/audio.ts | 2 +- src/type/preload.ts | 2 +- 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/src/components/AudioCell.vue b/src/components/AudioCell.vue index c3d42711fd..89e97d1404 100644 --- a/src/components/AudioCell.vue +++ b/src/components/AudioCell.vue @@ -65,7 +65,14 @@ isMultipleEngine && characterInfo.metas.styles.length < 2 " > - +
{{ characterInfo.metas.speakerName }}
@@ -130,7 +137,10 @@ > diff --git a/src/store/audio.ts b/src/store/audio.ts index a09696b595..eaf0a1f23b 100644 --- a/src/store/audio.ts +++ b/src/store/audio.ts @@ -644,6 +644,7 @@ export const audioStore: VoiceVoxStoreOptions< styles[i] = { styleName: style.name, styleId: style.id, + engineId, iconPath: base64ToUrl(styleInfo.icon, "image/png"), voiceSamplePaths: voiceSamples, }; @@ -666,7 +667,6 @@ export const audioStore: VoiceVoxStoreOptions< const styles = getStyles(speaker, speakerInfo); const characterInfo: CharacterInfo = { portraitPath: base64ToUrl(speakerInfo.portrait, "image/png"), - engineId, metas: { speakerUuid: speaker.speakerUuid, speakerName: speaker.name, diff --git a/src/type/preload.ts b/src/type/preload.ts index f60b8adcde..38b98b234e 100644 --- a/src/type/preload.ts +++ b/src/type/preload.ts @@ -106,6 +106,7 @@ export type StyleInfo = { styleName?: string; styleId: number; iconPath: string; + engineId: string; voiceSamplePaths: string[]; }; @@ -117,7 +118,6 @@ export type MetasJson = { export type CharacterInfo = { portraitPath: string; - engineId: string; metas: { speakerUuid: string; speakerName: string; From 57c0cba8d88718cc1bf9c2701bf55223cce7f779 Mon Sep 17 00:00:00 2001 From: sevenc-nanashi Date: Sun, 18 Sep 2022 09:09:17 +0900 Subject: [PATCH 3/5] =?UTF-8?q?Delete:=20=E6=B6=88=E3=81=97=E5=BF=98?= =?UTF-8?q?=E3=82=8C=E3=82=92=E5=89=8A=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/AudioCell.vue | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/src/components/AudioCell.vue b/src/components/AudioCell.vue index 89e97d1404..638cb6dd68 100644 --- a/src/components/AudioCell.vue +++ b/src/components/AudioCell.vue @@ -597,17 +597,6 @@ export default defineComponent({ .opened-character-item { background-color: rgba(colors.$primary-rgb, 0.2); } - .engine-name { - // position: absolute; - // left: 4px; - // bottom: 0; - margin-top: auto; - margin-left: auto; - padding-left: 8px; - text-align: right; - opacity: 67%; - font-size: 0.67rem; - } .engine-icon { position: absolute; bottom: 0; From 2fb9b87319343fcd8eed1c15c3014b9f19886a83 Mon Sep 17 00:00:00 2001 From: sevenc-nanashi Date: Sun, 18 Sep 2022 09:11:19 +0900 Subject: [PATCH 4/5] =?UTF-8?q?Change:=20=E3=82=A2=E3=82=A4=E3=82=B3?= =?UTF-8?q?=E3=83=B3=E3=81=A0=E3=81=91=E6=B8=A1=E3=81=99=E3=82=88=E3=81=86?= =?UTF-8?q?=E3=81=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/AudioCell.vue | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/src/components/AudioCell.vue b/src/components/AudioCell.vue index 638cb6dd68..24c308ac72 100644 --- a/src/components/AudioCell.vue +++ b/src/components/AudioCell.vue @@ -67,10 +67,10 @@ > @@ -137,10 +137,10 @@ > @@ -466,6 +466,16 @@ export default defineComponent({ // 複数エンジン const isMultipleEngine = computed(() => store.state.engineIds.length > 1); + const engineIcons = computed( + () => + Object.fromEntries( + store.state.engineIds.map((engineId) => [ + engineId, + store.state.engineInfos[engineId].iconData, + ]) + ) as { [key: string]: string } + ); + return { userOrderedCharacterInfos, isInitializingSpeaker, @@ -481,7 +491,7 @@ export default defineComponent({ isActiveAudioCell, audioTextBuffer, isMultipleEngine, - engineInfos: store.state.engineInfos, + engineIcons, setAudioTextBuffer, pushAudioText, changeStyleId, From 29c5ace596e04aa2188e3b58d11a6ed93a004625 Mon Sep 17 00:00:00 2001 From: sevenc-nanashi Date: Mon, 19 Sep 2022 07:43:28 +0900 Subject: [PATCH 5/5] =?UTF-8?q?Delete:=20=E4=B8=8D=E8=A6=81=E3=81=AAtype?= =?UTF-8?q?=20assertion=E3=82=92=E5=89=8A=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/AudioCell.vue | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/src/components/AudioCell.vue b/src/components/AudioCell.vue index 24c308ac72..07de862396 100644 --- a/src/components/AudioCell.vue +++ b/src/components/AudioCell.vue @@ -466,14 +466,13 @@ export default defineComponent({ // 複数エンジン const isMultipleEngine = computed(() => store.state.engineIds.length > 1); - const engineIcons = computed( - () => - Object.fromEntries( - store.state.engineIds.map((engineId) => [ - engineId, - store.state.engineInfos[engineId].iconData, - ]) - ) as { [key: string]: string } + const engineIcons = computed(() => + Object.fromEntries( + store.state.engineIds.map((engineId) => [ + engineId, + store.state.engineInfos[engineId].iconData, + ]) + ) ); return {