@@ -497,7 +497,10 @@ private static GUIStyle BoldCenteredHeaderStyle
497
497
private string currentModelId ;
498
498
499
499
[ SerializeField ]
500
- private Vector2 voiceSettingsSliderValues = Vector2 . zero ;
500
+ private Vector3 voiceSettingsSliderValues = Vector3 . zero ;
501
+
502
+ [ SerializeField ]
503
+ private bool useSpeakerBoost = true ;
501
504
502
505
[ SerializeField ]
503
506
private List < AudioClip > newSampleClips ;
@@ -823,7 +826,7 @@ private void RenderSpeechSynthesis()
823
826
}
824
827
825
828
if ( currentVoiceSettings == null ||
826
- voiceSettingsSliderValues == Vector2 . zero )
829
+ voiceSettingsSliderValues == Vector3 . zero )
827
830
{
828
831
GetDefaultVoiceSettings ( currentVoiceOption ) ;
829
832
}
@@ -871,6 +874,21 @@ private void RenderSpeechSynthesis()
871
874
EndIndent ( InnerLabelIndentLevel ) ;
872
875
}
873
876
EditorGUILayout . EndHorizontal ( ) ;
877
+ EditorGUILayout . Space ( EndWidth ) ;
878
+ voiceSettingsSliderValues . z = EditorGUILayout . Slider ( "Style" , voiceSettingsSliderValues . z , 0f , 1f ) ;
879
+ EditorGUILayout . BeginHorizontal ( ) ;
880
+ {
881
+ StartIndent ( InnerLabelIndentLevel ) ;
882
+ EditorGUIUtility . labelWidth = WideColumnWidth * InnerLabelWidth ;
883
+ EditorGUILayout . LabelField ( "Low" , expandWidthOption ) ;
884
+ GUILayout . FlexibleSpace ( ) ;
885
+ EditorGUILayout . LabelField ( "High" , RightMiddleAlignedLabel , expandWidthOption ) ;
886
+ EditorGUIUtility . labelWidth = WideColumnWidth * SettingsLabelWidth ;
887
+ EndIndent ( InnerLabelIndentLevel ) ;
888
+ }
889
+ EditorGUILayout . EndHorizontal ( ) ;
890
+ EditorGUILayout . Space ( EndWidth ) ;
891
+ useSpeakerBoost = EditorGUILayout . Toggle ( "Speaker Boost" , useSpeakerBoost ) ;
874
892
EditorGUILayout . Space ( ) ;
875
893
}
876
894
@@ -921,7 +939,7 @@ private void RenderSpeechSynthesis()
921
939
922
940
if ( EditorGUI . EndChangeCheck ( ) )
923
941
{
924
- currentVoiceSettings = new VoiceSettings ( voiceSettingsSliderValues . x , voiceSettingsSliderValues . y ) ;
942
+ currentVoiceSettings = new VoiceSettings ( voiceSettingsSliderValues . x , voiceSettingsSliderValues . y , useSpeakerBoost , voiceSettingsSliderValues . z ) ;
925
943
}
926
944
927
945
EditorGUILayout . EndHorizontal ( ) ;
@@ -1052,7 +1070,8 @@ private async void GetDefaultVoiceSettings(Voice voice)
1052
1070
var defaultVoiceSettings = await api . VoicesEndpoint . GetDefaultVoiceSettingsAsync ( ) ;
1053
1071
await api . VoicesEndpoint . EditVoiceSettingsAsync ( voice , defaultVoiceSettings ) ;
1054
1072
currentVoiceSettings = await api . VoicesEndpoint . GetVoiceSettingsAsync ( voice ) ;
1055
- voiceSettingsSliderValues = new Vector2 ( defaultVoiceSettings . Stability , defaultVoiceSettings . SimilarityBoost ) ;
1073
+ voiceSettingsSliderValues = new Vector3 ( defaultVoiceSettings . Stability , defaultVoiceSettings . SimilarityBoost , 0.45f ) ;
1074
+ useSpeakerBoost = true ;
1056
1075
}
1057
1076
catch ( Exception e )
1058
1077
{
0 commit comments