Skip to content

Commit

Permalink
FIX: 最初に設定されるキャラクターが正しく選択されない問題を修正 (#1191)
Browse files Browse the repository at this point in the history
close undefined
  • Loading branch information
sabonerune authored Feb 9, 2023
1 parent a22046c commit 7203309
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/store/audio.ts
Original file line number Diff line number Diff line change
Expand Up @@ -486,7 +486,14 @@ export const audioStore = createPartialStore<AudioStoreTypes>({

const text = payload.text ?? "";

const defaultStyleId = state.defaultStyleIds[0];
const defaultSpeakerId =
getters.USER_ORDERED_CHARACTER_INFOS[0].metas.speakerUuid;
const defaultStyleId = state.defaultStyleIds.find(
(styleId) => styleId.speakerUuid === defaultSpeakerId
);
if (defaultStyleId == undefined)
throw new Error("defaultStyleId == undefined");

const voice = payload.voice ?? {
engineId: defaultStyleId.engineId,
speakerId: defaultStyleId.speakerUuid,
Expand Down

0 comments on commit 7203309

Please sign in to comment.