Skip to content

Commit

Permalink
Fix: AivisSpeech Engine 以外の音声合成エンジンでのみ「文内無音倍率」を表示する
Browse files Browse the repository at this point in the history
本来はエンジンマニフェストの値を見た方が良いが、本家自体がそう実装してないので当面これで行く
  • Loading branch information
tsukumijima committed Dec 3, 2024
1 parent 04eddb7 commit 6d25ac1
Showing 1 changed file with 24 additions and 19 deletions.
43 changes: 24 additions & 19 deletions src/components/Talk/AudioInfo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -516,25 +516,30 @@ const parameterConfigs = computed<ParameterConfig[]>(() => [
}),
key: "volumeScale",
},
{
label: "文内無音倍率",
tooltip: "文内無音時間の長さを調整できます",
sliderProps: {
modelValue: () => query.value?.pauseLengthScale ?? null,
disable: () => uiLocked.value,
max: SLIDER_PARAMETERS.PAUSE_LENGTH_SCALE.max,
min: SLIDER_PARAMETERS.PAUSE_LENGTH_SCALE.min,
step: SLIDER_PARAMETERS.PAUSE_LENGTH_SCALE.step,
scrollStep: SLIDER_PARAMETERS.PAUSE_LENGTH_SCALE.scrollStep,
scrollMinStep: SLIDER_PARAMETERS.PAUSE_LENGTH_SCALE.scrollMinStep,
},
onChange: (pauseLengthScale: number) =>
store.actions.COMMAND_MULTI_SET_AUDIO_PAUSE_LENGTH_SCALE({
audioKeys: selectedAudioKeys.value,
pauseLengthScale,
}),
key: "pauseLengthScale",
},
// AivisSpeech Engine 以外の音声合成エンジンでのみ「文内無音倍率」を表示する
...(audioItem.value.voice.engineId !== store.getters.DEFAULT_ENGINE_ID
? ([
{
label: "文内無音倍率",
tooltip: "文内無音時間の長さを調整できます",
sliderProps: {
modelValue: () => query.value?.pauseLengthScale ?? null,
disable: () => uiLocked.value,
max: SLIDER_PARAMETERS.PAUSE_LENGTH_SCALE.max,
min: SLIDER_PARAMETERS.PAUSE_LENGTH_SCALE.min,
step: SLIDER_PARAMETERS.PAUSE_LENGTH_SCALE.step,
scrollStep: SLIDER_PARAMETERS.PAUSE_LENGTH_SCALE.scrollStep,
scrollMinStep: SLIDER_PARAMETERS.PAUSE_LENGTH_SCALE.scrollMinStep,
},
onChange: (pauseLengthScale: number) =>
store.actions.COMMAND_MULTI_SET_AUDIO_PAUSE_LENGTH_SCALE({
audioKeys: selectedAudioKeys.value,
pauseLengthScale,
}),
key: "pauseLengthScale",
},
] as ParameterConfig[])
: []),
{
label: "開始無音(秒)",
tooltip: "音声先頭の無音時間の長さを調整できます",
Expand Down

0 comments on commit 6d25ac1

Please sign in to comment.