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

モーフィング機能の制限に対応 #1128

Closed
wants to merge 23 commits into from
Closed
Show file tree
Hide file tree
Changes from 9 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 openapi.json

Large diffs are not rendered by default.

50 changes: 38 additions & 12 deletions src/components/AudioInfo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,7 @@
非対応エンジンです
</div>
<div
v-else-if="isValidMorphingInfo"
v-else-if="isInvalidMorphingInfo"
class="text-warning"
style="font-size: 0.7rem"
>
Expand Down Expand Up @@ -663,24 +663,50 @@ export default defineComponent({
() => supportedFeatures.value?.synthesisMorphing
);

const isValidMorphingInfo = computed(() => {
const isInvalidMorphingInfo = computed(() => {
if (audioItem.value.morphingInfo == undefined) return false;
return !store.getters.VALID_MOPHING_INFO(audioItem.value);
});

const mophingTargetEngines = store.getters.MORPHING_SUPPORTED_ENGINES;

const mophingTargetCharacters = computed(() => {
const allCharacters = store.getters.GET_ORDERED_ALL_CHARACTER_INFOS;
return allCharacters
.map((character) => {
// 選択可能なスタイルをフィルタリングする.
const baseEngineId = audioItem.value.engineId;
const baseStyleId = audioItem.value.styleId;
if (baseEngineId === undefined || baseStyleId == undefined) {
return [];
}
Segu-g marked this conversation as resolved.
Show resolved Hide resolved
return [
/**
* isInvalidMorphingInfoのとき、mophingTargetCharactersにmorphingTargetVoiceの
* 値が存在しないことによってcharacter-button内で画像が描画出来ない問題を防ぐ
*/
...(isInvalidMorphingInfo.value && morphingTargetCharacterInfo.value
? [morphingTargetCharacterInfo.value]
: []),
...store.getters.GET_ORDERED_ALL_CHARACTER_INFOS.map((character) => {
Segu-g marked this conversation as resolved.
Show resolved Hide resolved
const targetStyles = character.metas.styles.filter((style) =>
mophingTargetEngines.includes(style.engineId)
store.getters.IS_A_VALID_MOPHING_PAIR(
{
engineId: baseEngineId,
styleId: baseStyleId,
},
{
engineId: style.engineId,
styleId: style.styleId,
}
)
Segu-g marked this conversation as resolved.
Show resolved Hide resolved
);
Hiroshiba marked this conversation as resolved.
Show resolved Hide resolved
character.metas.styles = targetStyles;
return character;
})
.filter((characters) => characters.metas.styles.length >= 1);
return {
...character,
metas: {
...character.metas,
styles: targetStyles,
},
};
}).filter((characters) => characters.metas.styles.length >= 1),
];
});
Copy link
Member

Choose a reason for hiding this comment

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

もう1つUXレベルの判断です。 (実装してくださった @sabonerune さんの感謝も込めて・・・! )
今まででは全キャラ全スタイルが表示されていたのが、ここで可能なキャラだけになります。

そもそもですが、ボイボは8割のキャラが8割のキャラとモーフィング可能で、2割のキャラはほぼ不可となりそうです。
仕様としてどの形が良いか考えてみました。

最高なのはこうだと思います。

  • 選択可能なキャラが上に表示
  • 不可能なキャラが下に表示
  • 選択不可能な理由が書いてある

このパターンだと3番目の選択不可能な理由を書けるUIの用意が大変だと思いました。
次はこうかなと思います。

  • 選択可能なキャラだけが表示されている
  • 表示されないキャラクターがいることの理由がわかる

理由の表示はここのUIでできるとベターだと思いますが、なかなか案内が難しそうに感じます。
良い方法がない場合はQ&A+使い方で案内が良いかなと思いました。

なぜ全キャラを選択できるUIが厳しいのかというと、全キャラが選択不可能なキャラもいることがわかったためです。
このキャラを選んでいた場合の運の悪いユーザーのパターンだと、全キャラの選択を試して、全キャラダメだったとわかるというなかなかしんどそうなUXになってしまうためです。
元のUIがよくないわけではなく、想定が変わったことが今回の判断の変更理由になります。

もっと良い形もあるかもしれません、アイデア募集しています・・・!!!


const morphingTargetVoice = computed({
Expand Down Expand Up @@ -711,7 +737,7 @@ export default defineComponent({
});

const morphingTargetCharacterInfo = computed(() =>
mophingTargetCharacters.value.find(
store.getters.GET_ORDERED_ALL_CHARACTER_INFOS.find(
(character) =>
character.metas.speakerUuid === morphingTargetVoice.value?.speakerId
)
Expand Down Expand Up @@ -1140,7 +1166,7 @@ export default defineComponent({
mophingTargetEngines,
shouldShowMorphing,
isSupportedMorphing,
isValidMorphingInfo,
isInvalidMorphingInfo,
mophingTargetCharacters,
morphingTargetVoice,
morphingTargetCharacterInfo,
Expand Down
2 changes: 2 additions & 0 deletions src/openapi/.openapi-generator/FILES

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

74 changes: 73 additions & 1 deletion src/openapi/apis/DefaultApi.ts

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

2 changes: 1 addition & 1 deletion src/openapi/models/AccentPhrase.ts

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

2 changes: 1 addition & 1 deletion src/openapi/models/AudioQuery.ts

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

2 changes: 1 addition & 1 deletion src/openapi/models/DownloadableLibrary.ts

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

2 changes: 1 addition & 1 deletion src/openapi/models/EngineManifest.ts

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

2 changes: 1 addition & 1 deletion src/openapi/models/HTTPValidationError.ts

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

2 changes: 1 addition & 1 deletion src/openapi/models/LicenseInfo.ts

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

2 changes: 1 addition & 1 deletion src/openapi/models/Mora.ts

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

2 changes: 1 addition & 1 deletion src/openapi/models/ParseKanaBadRequest.ts

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

2 changes: 1 addition & 1 deletion src/openapi/models/Preset.ts

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

14 changes: 13 additions & 1 deletion src/openapi/models/Speaker.ts

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

2 changes: 1 addition & 1 deletion src/openapi/models/SpeakerInfo.ts

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

2 changes: 1 addition & 1 deletion src/openapi/models/SpeakerStyle.ts

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

37 changes: 37 additions & 0 deletions src/openapi/models/SpeakerSupportPermittedSynthesisMorphing.ts

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

Loading