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

複数エンジン対応:INITIALIZE_ENGINE_SPEAKERの修正漏れを修正 #928

Merged
Merged
Changes from all 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
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