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

Fix #1797 (ソングで四国めたん トーク・ノーマルが選択されている状態になっている) #1798

Merged
merged 318 commits into from
Jan 30, 2024

Conversation

madosuki
Copy link
Contributor

内容

#1782 と同様の問題で
https://github.com/VOICEVOX/voicevox/blob/23fe2593458110deb4dba2420e6c290c0944a4e2/src/store/singing.ts#L188C1-L195C26 内でsingerがundefinedの時デフォルトスタイルIDを引っ張って適用しようとするが,この際にトークの物が使われてしまいトークスタイルが最初に選択された状態になってしまうので,とりあえず決め打ちにしてしまう.

関連 Issue

close #1797

スクリーンショット・動画など

その他

@madosuki madosuki requested a review from a team as a code owner January 30, 2024 02:40
@madosuki madosuki requested review from y-chan and removed request for a team January 30, 2024 02:40
Copy link
Member

@y-chan y-chan left a comment

Choose a reason for hiding this comment

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

LGTM!

Copy link
Member

@Hiroshiba Hiroshiba left a comment

Choose a reason for hiding this comment

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

LGTM!!!

Comment on lines 198 to 205
/*
Sing/CharacterMenuButton.vue内のgetDefaultStyle関数内の問題と同じ
対処療法として最初のスタイルを仮のスタイルにしている
*/
const defaultStyleId =
userOrderedCharacterInfos[0].metas.styles[0].styleId;

const styleId = singer?.styleId ?? defaultStyleId;
Copy link
Member

Choose a reason for hiding this comment

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

ここにはsing可能なキャラしか来ないので、このワークアラウンドで問題なさそうに思いました!!

細かいですが、コメントで参照先を書くと、参照先の名前などが変わったやそちらだけfixされた場合に、何を目的としていたコメントなのか追いづらくなるかもと思いました。
あと/**/より//のが行数少なくて良い感じかも。

なのでこんな感じにさせていただきます!!

Suggested change
/*
Sing/CharacterMenuButton.vue内のgetDefaultStyle関数内の問題と同じ
対処療法として最初のスタイルを仮のスタイルにしている
*/
const defaultStyleId =
userOrderedCharacterInfos[0].metas.styles[0].styleId;
const styleId = singer?.styleId ?? defaultStyleId;
// 最初のスタイルをソングエディタにおける仮のデフォルトスタイルとする
// TODO: ソングエディタ向けのデフォルトスタイルをどうするか考える
const defaultStyleId =
userOrderedCharacterInfos[0].metas.styles[0].styleId;
const styleId = singer?.styleId ?? defaultStyleId;

@@ -193,6 +194,15 @@ export const singingStore = createPartialStore<SingingStoreTypes>({
x.speakerUuid === userOrderedCharacterInfos[0].metas.speakerUuid // FIXME: defaultStyleIds内にspeakerUuidがない場合がある
)
].defaultStyleId;
*/
Copy link
Member

Choose a reason for hiding this comment

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

この上のコメントはまあ削除で良さそう。こっちで消しちゃいます!

@Hiroshiba Hiroshiba changed the title Fix #1797 Fix #1797 (ソングで四国めたん トーク・ノーマルが選択されている状態になっている) Jan 30, 2024
@Hiroshiba Hiroshiba merged commit 27867b3 into VOICEVOX:main Jan 30, 2024
8 checks passed
@madosuki madosuki deleted the fix_1797 branch February 10, 2024 13:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ソングで四国めたん トーク・ノーマルが選択されている状態になっている
3 participants