Skip to content

Commit

Permalink
複数エンジン対応:INITIALIZE_ENGINE_SPEAKERの修正漏れを修正 (#928)
Browse files Browse the repository at this point in the history
Fix: INITIALIZE_ENGINE_SPEAKERの修正漏れを修正
  • Loading branch information
sevenc-nanashi authored Sep 9, 2022
1 parent 5482e27 commit 1d25170
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/store/audio.ts
Original file line number Diff line number Diff line change
Expand Up @@ -714,11 +714,7 @@ export const audioStore: VoiceVoxStoreOptions<
/**
* 指定した話者(スタイルID)に対してエンジン側の初期化を行い、即座に音声合成ができるようにする。
*/
async INITIALIZE_ENGINE_SPEAKER({ state, dispatch }, { styleId }) {
const engineId: string | undefined = state.engineIds[0]; // TODO: 複数エンジン対応, 暫定的に0番目のエンジンのみを使用する。将来的にGENERATE_AUDIO_ITEMの引数にengineId/engineIdを追加する予定
if (engineId === undefined)
throw new Error(`No such engine registered: index == 0`);

async INITIALIZE_ENGINE_SPEAKER({ dispatch }, { engineId, styleId }) {
await dispatch("ASYNC_UI_LOCK", {
callback: () =>
dispatch("INSTANTIATE_ENGINE_CONNECTOR", {
Expand Down

0 comments on commit 1d25170

Please sign in to comment.