diff --git a/src/YMM4VoiSonaPlugin/ViewModel/TalkPresetsViewModel.cs b/src/YMM4VoiSonaPlugin/ViewModel/TalkPresetsViewModel.cs index a098875..5af7abe 100644 --- a/src/YMM4VoiSonaPlugin/ViewModel/TalkPresetsViewModel.cs +++ b/src/YMM4VoiSonaPlugin/ViewModel/TalkPresetsViewModel.cs @@ -58,6 +58,9 @@ public TalkPresetsViewModel( .ConfigureAwait(true); TaskbarUtil.FinishIndeterminate(); Presets = [.. presets]; + VoiSonaTalkSettings.Default + .SpeakersPresets[voice] = [..presets]; + VoiSonaTalkSettings.Default.Save(); WindowUtil.FocusBack(); PresetIndex = -1; }); @@ -92,6 +95,7 @@ await _service.SetPresetsAsync(voice, preset) Value = s.Value, Description = $"Style: {s.Key}", }); + vsParam.Preset = [.. Presets]; vsParam.PresetIndex = index; vsParam.Alpha = globalParams["Alpha"]; vsParam.Husky = globalParams["Hus."]; diff --git a/src/YMM4VoiSonaPlugin/VoiSonaTalkSettings.cs b/src/YMM4VoiSonaPlugin/VoiSonaTalkSettings.cs index 48635e8..4757752 100644 --- a/src/YMM4VoiSonaPlugin/VoiSonaTalkSettings.cs +++ b/src/YMM4VoiSonaPlugin/VoiSonaTalkSettings.cs @@ -126,9 +126,8 @@ await UIThread.InvokeAsync(()=>{ await UIThread.InvokeAsync(()=>{ TaskbarUtil.FinishIndeterminate(); + WindowUtil.FocusBack(); return ValueTask.CompletedTask; }).ConfigureAwait(false); - - WindowUtil.FocusBack(); } }