diff --git a/OSCVRCWiz/App.config b/OSCVRCWiz/App.config index bb2f96aa..bdd1eec3 100644 Binary files a/OSCVRCWiz/App.config and b/OSCVRCWiz/App.config differ diff --git a/OSCVRCWiz/Resources/StartUp/Updater.cs b/OSCVRCWiz/Resources/StartUp/Updater.cs index e4982045..a0863c45 100644 --- a/OSCVRCWiz/Resources/StartUp/Updater.cs +++ b/OSCVRCWiz/Resources/StartUp/Updater.cs @@ -7,7 +7,7 @@ namespace OSCVRCWiz.Resources.StartUp public class Updater { - public static string currentVersion = "1.5.7.5"; + public static string currentVersion = "1.5.8"; public static string updateXMLName = "https://github.com/VRCWizard/TTS-Voice-Wizard/releases/latest/download/AutoUpdater-x64.xml"; public static async void getGithubInfo() diff --git a/OSCVRCWiz/Services/Integrations/Heartrate/HeartratePulsoid.cs b/OSCVRCWiz/Services/Integrations/Heartrate/HeartratePulsoid.cs index 2fa7fd8f..c7139c93 100644 --- a/OSCVRCWiz/Services/Integrations/Heartrate/HeartratePulsoid.cs +++ b/OSCVRCWiz/Services/Integrations/Heartrate/HeartratePulsoid.cs @@ -1,17 +1,7 @@ -using Octokit; -using OSCVRCWiz.Resources.StartUp.StartUp; -using OSCVRCWiz.Services.Integrations.Media; +using OSCVRCWiz.Resources.StartUp.StartUp; using OSCVRCWiz.Services.Text; -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.Linq; -using System.Net.Http.Headers; using System.Net.WebSockets; using System.Text; -using System.Threading; -using System.Threading.Tasks; -using System.Windows.Markup; namespace OSCVRCWiz.Services.Integrations.Heartrate diff --git a/OSCVRCWiz/Services/Integrations/Media/SpotifyAddon.cs b/OSCVRCWiz/Services/Integrations/Media/SpotifyAddon.cs index e3c070ef..c2b97b90 100644 --- a/OSCVRCWiz/Services/Integrations/Media/SpotifyAddon.cs +++ b/OSCVRCWiz/Services/Integrations/Media/SpotifyAddon.cs @@ -1,18 +1,9 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using SpotifyAPI.Web.Auth; -using SpotifyAPI.Web; +using OSCVRCWiz.Services.Text; using OSCVRCWiz.Settings; +using SpotifyAPI.Web; +using SpotifyAPI.Web.Auth; using System.Diagnostics; -using System.Windows; -using OSCVRCWiz.Resources; -using static System.Net.Mime.MediaTypeNames; -using OSCVRCWiz.Services.Text; -using OSCVRCWiz.RJControls; -using Newtonsoft.Json.Linq; +using System.Text; namespace OSCVRCWiz.Services.Integrations.Media { @@ -37,7 +28,41 @@ public class SpotifyAddon public static string previousError = ""; + static DateTime tokenExpirationTime; + + + // check if the token is expired + private static bool IsTokenExpired() + { + if (myPKCEToken != null) + { + // DateTime tokenExpirationTime = DateTime.Now.AddSeconds(myPKCEToken.ExpiresIn); + + // OutputText.outputLog("checking if token expired: "+ (tokenExpirationTime <= DateTime.Now).ToString()); + return (tokenExpirationTime <= DateTime.Now); + } + else + { + Debug.WriteLine("----- updating tokens -----"); + return true; + } + } + // refresh the access token + private static async Task RefreshAccessToken() + { + OutputText.outputLog("Debug: Updating Spotify Tokens"); + string clientId = legacyState ? clientIdLegacy : Settings1.Default.SpotifyKey; + Debug.WriteLine("----Spotify token refresh Attempt-----"); + PKCETokenRefreshRequest refreshRequest = new PKCETokenRefreshRequest(clientId, Settings1.Default.PKCERefreshToken); + PKCETokenResponse refreshResponse = await new OAuthClient().RequestToken(refreshRequest); + myPKCEToken = refreshResponse; + OutputText.outputLog("Debug: Your Spotify Token will refresh in "+((myPKCEToken.ExpiresIn/60)-1)+" minutes"); + + tokenExpirationTime = DateTime.Now.AddSeconds(myPKCEToken.ExpiresIn-60); + // OutputText.outputLog((DateTime.Now.AddSeconds(myPKCEToken.ExpiresIn - 60) <= DateTime.Now).ToString()); + return refreshResponse; + } public static async Task spotifyGetCurrentSongInfo() { @@ -48,34 +73,22 @@ public static async Task spotifyGetCurrentSongInfo() if (myClient == null) { myClient = new SpotifyClient(Settings1.Default.PKCEAccessToken); + } - if (myClient != null) + else { try { - if (legacyState == true) + bool tokenExpired = IsTokenExpired(); + if (tokenExpired) { - Debug.WriteLine("----Spotify token refreshed Attempt-----"); - PKCETokenRefreshRequest refreshRequest = new PKCETokenRefreshRequest(clientIdLegacy, Settings1.Default.PKCERefreshToken); - PKCETokenResponse refreshResponse = await new OAuthClient().RequestToken(refreshRequest); + Debug.WriteLine("----Spotify token needs refreshing-----"); + PKCETokenResponse refreshResponse = await RefreshAccessToken(); myClient = new SpotifyClient(refreshResponse.AccessToken); Settings1.Default.PKCERefreshToken = refreshResponse.RefreshToken; Settings1.Default.PKCEAccessToken = refreshResponse.AccessToken; Settings1.Default.Save(); - Debug.WriteLine("----Spotify token refreshed Successful-----"); - } - else - { - string clientId = Settings1.Default.SpotifyKey; - Debug.WriteLine("----Spotify token refreshed Attempt-----"); - PKCETokenRefreshRequest refreshRequest = new PKCETokenRefreshRequest(clientId, Settings1.Default.PKCERefreshToken); - PKCETokenResponse refreshResponse = await new OAuthClient().RequestToken(refreshRequest); - myClient = new SpotifyClient(refreshResponse.AccessToken); - Settings1.Default.PKCERefreshToken = refreshResponse.RefreshToken; - Settings1.Default.PKCEAccessToken = refreshResponse.AccessToken; - Settings1.Default.Save(); - Debug.WriteLine("----Spotify token refreshed Successful-----"); - + Debug.WriteLine("----Spotify token refreshed Successfully-----"); } if (spotifyConnect == false) @@ -89,7 +102,7 @@ public static async Task spotifyGetCurrentSongInfo() catch (APIException ex) { - Debug.WriteLine("-----Spotify token doesn't need to refresh-----" + ex.Response.Body.ToString()); + Debug.WriteLine("-----Spotify error-----" + ex.Response.Body.ToString()); } FullTrack m_currentTrack; @@ -478,27 +491,8 @@ public static async Task SpotifyConnect() globalVerifier = verifier; // var loginRequest = new LoginRequest(_server.BaseUri, clientId,LoginRequest.ResponseType.Code) - if (legacyState == true) - { - var loginRequest = new LoginRequest(_server.BaseUri, clientIdLegacy, LoginRequest.ResponseType.Code) - { - CodeChallengeMethod = "S256", - CodeChallenge = challenge, - Scope = new[] { Scopes.UserReadCurrentlyPlaying, Scopes.UserReadPlaybackState } - }; - // BrowserUtil.Open(loginRequest.ToUri()); - string url = loginRequest.ToUri().ToString(); - Process.Start(new ProcessStartInfo(url) { UseShellExecute = true });//this link doesnt like the other method - if (VoiceWizardWindow.MainFormGlobal.rjToggleShowConnectURISpotify.Checked) - { - OutputText.outputLog(loginRequest.ToUri().ToString()); - } - - } - else - { - string clientId = Settings1.Default.SpotifyKey; - var loginRequest = new LoginRequest(_server.BaseUri, clientId, LoginRequest.ResponseType.Code) + string clientId = legacyState ? clientIdLegacy : Settings1.Default.SpotifyKey; + var loginRequest = new LoginRequest(_server.BaseUri, clientId, LoginRequest.ResponseType.Code) { CodeChallengeMethod = "S256", CodeChallenge = challenge, @@ -514,32 +508,23 @@ public static async Task SpotifyConnect() OutputText.outputLog(loginRequest.ToUri().ToString()); } - } + } // This method should be called from your web-server when the user visits "http://localhost:5000/callback" - public static async Task GetCallback(object sender, AuthorizationCodeResponse response) + public static async Task GetCallback(object sender, AuthorizationCodeResponse response) //this function gets and saves the { Debug.WriteLine("Getcallback code: " + response.Code.ToString()); - if (legacyState == true) - { - var initialResponse = await new OAuthClient().RequestToken(new PKCETokenRequest(clientIdLegacy, response.Code, new Uri("http://localhost:5000/callback"), globalVerifier)); - Settings1.Default.PKCERefreshToken = initialResponse.RefreshToken; - Settings1.Default.PKCEAccessToken = initialResponse.AccessToken; - Settings1.Default.Save(); - - } - else - { - string clientId = Settings1.Default.SpotifyKey; + string clientId = legacyState ? clientIdLegacy : Settings1.Default.SpotifyKey; var initialResponse = await new OAuthClient().RequestToken(new PKCETokenRequest(clientId, response.Code, new Uri("http://localhost:5000/callback"), globalVerifier)); Settings1.Default.PKCERefreshToken = initialResponse.RefreshToken; Settings1.Default.PKCEAccessToken = initialResponse.AccessToken; Settings1.Default.Save(); - } + + } public static string Base64Encode(string plainText) diff --git a/OSCVRCWiz/Services/Integrations/OSCListener.cs b/OSCVRCWiz/Services/Integrations/OSCListener.cs index adedb0e5..39f9de51 100644 --- a/OSCVRCWiz/Services/Integrations/OSCListener.cs +++ b/OSCVRCWiz/Services/Integrations/OSCListener.cs @@ -1,14 +1,7 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using CoreOSC; +using CoreOSC; using OSCVRCWiz.Resources.StartUp.StartUp; -using OSCVRCWiz.RJControls; using OSCVRCWiz.Services.Speech.TextToSpeech; using OSCVRCWiz.Services.Text; -using OSCVRCWiz.Settings; @@ -51,12 +44,6 @@ public class OSCListener public static void OnStartUp() { - if (VoiceWizardWindow.MainFormGlobal.rjToggleActivatePulsoidStart.Checked == true)//turn on osc listener on start - { - Task.Run(() => OSCListener.OSCRecieveHeartRate()); - } - - if (VoiceWizardWindow.MainFormGlobal.rjToggleActivateOSCListenerStart.Checked == true)//turn on osc listener on start { Task.Run(() => OSCListener.OSCRecieveHeartRate()); diff --git a/OSCVRCWiz/Services/Speech/Speech Recognition/WebSocketServer.cs b/OSCVRCWiz/Services/Speech/Speech Recognition/WebSocketServer.cs index 43a4ddff..3763a61c 100644 --- a/OSCVRCWiz/Services/Speech/Speech Recognition/WebSocketServer.cs +++ b/OSCVRCWiz/Services/Speech/Speech Recognition/WebSocketServer.cs @@ -1,13 +1,8 @@ using OSCVRCWiz.Services.Speech.TextToSpeech; using OSCVRCWiz.Services.Text; -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.Linq; using System.Net; using System.Net.WebSockets; using System.Text; -using System.Threading.Tasks; namespace OSCVRCWiz.Services.Speech.Speech_Recognition { diff --git a/OSCVRCWiz/Services/Speech/TextToSpeech/TTSEngines/ElevenLabsTTS.cs b/OSCVRCWiz/Services/Speech/TextToSpeech/TTSEngines/ElevenLabsTTS.cs index 4b6461bd..29c2518c 100644 --- a/OSCVRCWiz/Services/Speech/TextToSpeech/TTSEngines/ElevenLabsTTS.cs +++ b/OSCVRCWiz/Services/Speech/TextToSpeech/TTSEngines/ElevenLabsTTS.cs @@ -55,6 +55,8 @@ public static async Task CallElevenLabsAPIAsync(string textIn, string vo int optimize = 0; int stabilities = 0; int similarities = 0; + int styles = 0; + bool boost = true; string modelID = "eleven_monolingual_v1"; VoiceWizardWindow.MainFormGlobal.Invoke((MethodInvoker)delegate () { @@ -64,6 +66,8 @@ public static async Task CallElevenLabsAPIAsync(string textIn, string vo stabilities = VoiceWizardWindow.MainFormGlobal.trackBarStability.Value; similarities = VoiceWizardWindow.MainFormGlobal.trackBarSimilarity.Value; modelID = VoiceWizardWindow.MainFormGlobal.comboBoxLabsModelID.SelectedItem.ToString(); + styles = VoiceWizardWindow.MainFormGlobal.trackBarStyleExaggeration.Value; + boost= VoiceWizardWindow.MainFormGlobal.rjToggleSpeakerBoost.Checked; Debug.WriteLine(optimize); Debug.WriteLine(stabilities); @@ -76,6 +80,7 @@ public static async Task CallElevenLabsAPIAsync(string textIn, string vo var similarityFloat = similarities * 0.01f; var stabilityFloat = stabilities * 0.01f; + var styleFloat = styles * 0.01f; var url = $"https://api.elevenlabs.io/v1/text-to-speech/{voice}?optimize_streaming_latency={optimize}"; // var url = $"https://api.elevenlabs.io/v1/text-to-speech/{voice}"; @@ -90,7 +95,9 @@ public static async Task CallElevenLabsAPIAsync(string textIn, string vo voice_settings = new { stability = stabilityFloat, - similarity_boost = similarityFloat + similarity_boost = similarityFloat, + style = styleFloat, + use_speaker_boost = boost } }); diff --git a/OSCVRCWiz/Settings/LoadSettings.cs b/OSCVRCWiz/Settings/LoadSettings.cs index dfe0e779..5836f953 100644 --- a/OSCVRCWiz/Settings/LoadSettings.cs +++ b/OSCVRCWiz/Settings/LoadSettings.cs @@ -329,6 +329,10 @@ public static void LoadingSettings() VoiceWizardWindow.MainFormGlobal.trackBarSimilarity.Value = Settings1.Default.labsSimboost; VoiceWizardWindow.MainFormGlobal.trackBarStability.Value = Settings1.Default.labsStability; + VoiceWizardWindow.MainFormGlobal.trackBarStyleExaggeration.Value = Settings1.Default.labsStyleExagg; + VoiceWizardWindow.MainFormGlobal.rjToggleSpeakerBoost.Checked = Settings1.Default.labsSpeakerBoost; + + VoiceWizardWindow.MainFormGlobal.rjToggleButtonSaveToWav.Checked = Settings1.Default.saveToWav; VoiceWizardWindow.MainFormGlobal.labelTTSCharacters.Text = Settings1.Default.charsUsed; diff --git a/OSCVRCWiz/Settings/SaveSettings.cs b/OSCVRCWiz/Settings/SaveSettings.cs index 69c64d6d..ecae2033 100644 --- a/OSCVRCWiz/Settings/SaveSettings.cs +++ b/OSCVRCWiz/Settings/SaveSettings.cs @@ -269,6 +269,8 @@ public static void SavingSettings() Settings1.Default.labsOptimize = VoiceWizardWindow.MainFormGlobal.comboBoxLabsOptimize.SelectedIndex; Settings1.Default.labsSimboost = VoiceWizardWindow.MainFormGlobal.trackBarSimilarity.Value; Settings1.Default.labsStability = VoiceWizardWindow.MainFormGlobal.trackBarStability.Value; + Settings1.Default.labsStyleExagg = VoiceWizardWindow.MainFormGlobal.trackBarStyleExaggeration.Value; + Settings1.Default.labsSpeakerBoost = VoiceWizardWindow.MainFormGlobal.rjToggleSpeakerBoost.Checked; Settings1.Default.saveToWav = VoiceWizardWindow.MainFormGlobal.rjToggleButtonSaveToWav.Checked; diff --git a/OSCVRCWiz/Settings/Settings1.Designer.cs b/OSCVRCWiz/Settings/Settings1.Designer.cs index bb738e6f..2f2a5845 100644 --- a/OSCVRCWiz/Settings/Settings1.Designer.cs +++ b/OSCVRCWiz/Settings/Settings1.Designer.cs @@ -2017,7 +2017,7 @@ public int labsSimboost { [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("75")] + [global::System.Configuration.DefaultSettingValueAttribute("50")] public int labsStability { get { return ((int)(this["labsStability"])); @@ -2470,5 +2470,29 @@ public bool showSpotifyURi { this["showSpotifyURi"] = value; } } + + [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.DefaultSettingValueAttribute("0")] + public int labsStyleExagg { + get { + return ((int)(this["labsStyleExagg"])); + } + set { + this["labsStyleExagg"] = value; + } + } + + [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.DefaultSettingValueAttribute("True")] + public bool labsSpeakerBoost { + get { + return ((bool)(this["labsSpeakerBoost"])); + } + set { + this["labsSpeakerBoost"] = value; + } + } } } diff --git a/OSCVRCWiz/Settings/Settings1.settings b/OSCVRCWiz/Settings/Settings1.settings index 6102f83e..480cadab 100644 --- a/OSCVRCWiz/Settings/Settings1.settings +++ b/OSCVRCWiz/Settings/Settings1.settings @@ -501,7 +501,7 @@ 75 - 75 + 50 False @@ -614,5 +614,11 @@ False + + 0 + + + True + \ No newline at end of file diff --git a/OSCVRCWiz/VoiceWizardWindow.Designer.cs b/OSCVRCWiz/VoiceWizardWindow.Designer.cs index ef252a0c..f83b0d8d 100644 --- a/OSCVRCWiz/VoiceWizardWindow.Designer.cs +++ b/OSCVRCWiz/VoiceWizardWindow.Designer.cs @@ -145,6 +145,8 @@ private void InitializeComponent() button44 = new Button(); volumeStats = new Button(); groupBox4 = new GroupBox(); + label199 = new Label(); + this.rjToggleShowConnectURISpotify = new global::OSCVRCWiz.RJControls.RJToggleButton(); label155 = new Label(); this.rjToggleButtonForceMedia = new global::OSCVRCWiz.RJControls.RJToggleButton(); label108 = new Label(); @@ -586,6 +588,11 @@ private void InitializeComponent() comboBoxSysSpeechRecog = new ComboBox(); elevenLabs = new TabPage(); groupBox30 = new GroupBox(); + labelStyleExagg = new Label(); + trackBarStyleExaggeration = new TrackBar(); + label202 = new Label(); + label200 = new Label(); + this.rjToggleSpeakerBoost = new global::OSCVRCWiz.RJControls.RJToggleButton(); button51 = new Button(); labelStability = new Label(); labelSimboost = new Label(); @@ -674,8 +681,6 @@ private void InitializeComponent() openFileDialog1 = new OpenFileDialog(); logPanel = new Panel(); button45 = new Button(); - label199 = new Label(); - this.rjToggleShowConnectURISpotify = new global::OSCVRCWiz.RJControls.RJToggleButton(); mainTabControl.SuspendLayout(); tabPage4.SuspendLayout(); ((global::System.ComponentModel.ISupportInitialize)(this.webView21)).BeginInit(); @@ -751,6 +756,7 @@ private void InitializeComponent() groupBox28.SuspendLayout(); elevenLabs.SuspendLayout(); groupBox30.SuspendLayout(); + ((global::System.ComponentModel.ISupportInitialize)(trackBarStyleExaggeration)).BeginInit(); ((global::System.ComponentModel.ISupportInitialize)(trackBarSimilarity)).BeginInit(); ((global::System.ComponentModel.ISupportInitialize)(trackBarStability)).BeginInit(); groupBox39.SuspendLayout(); @@ -2625,6 +2631,33 @@ private void InitializeComponent() groupBox4.TabStop = false; groupBox4.Text = "Advanced Text Settings"; // + // label199 + // + label199.AutoSize = true; + label199.BackColor = Color.FromArgb((int)((byte)(68)), (int)((byte)(72)), (int)((byte)(111))); + label199.ForeColor = Color.Snow; + label199.Location = new Point(60, 150); + label199.Name = "label199"; + label199.Size = new Size(251, 15); + label199.TabIndex = 126; + label199.Text = "Show Spotify Connect URI in Log (don't share)"; + // + // rjToggleShowConnectURISpotify + // + this.rjToggleShowConnectURISpotify.AutoSize = true; + this.rjToggleShowConnectURISpotify.BackColor = Color.FromArgb((int)((byte)(255)), (int)((byte)(255)), (int)((byte)(192))); + this.rjToggleShowConnectURISpotify.Location = new Point(16, 150); + this.rjToggleShowConnectURISpotify.Margin = new Padding(3, 2, 3, 2); + this.rjToggleShowConnectURISpotify.MinimumSize = new Size(39, 16); + this.rjToggleShowConnectURISpotify.Name = "rjToggleShowConnectURISpotify"; + this.rjToggleShowConnectURISpotify.OffBackColor = Color.Gray; + this.rjToggleShowConnectURISpotify.OffToggleColor = Color.Gainsboro; + this.rjToggleShowConnectURISpotify.OnBackColor = Color.MediumSlateBlue; + this.rjToggleShowConnectURISpotify.OnToggleColor = Color.WhiteSmoke; + this.rjToggleShowConnectURISpotify.Size = new Size(39, 16); + this.rjToggleShowConnectURISpotify.TabIndex = 127; + this.rjToggleShowConnectURISpotify.UseVisualStyleBackColor = false; + // // label155 // label155.AutoSize = true; @@ -6325,7 +6358,7 @@ private void InitializeComponent() this.iconButton29.IconFont = global::FontAwesome.Sharp.IconFont.Auto; this.iconButton29.IconSize = 40; this.iconButton29.ImageAlign = ContentAlignment.MiddleLeft; - this.iconButton29.Location = new Point(608, 2); + this.iconButton29.Location = new Point(540, 2); this.iconButton29.Margin = new Padding(3, 2, 3, 2); this.iconButton29.Name = "iconButton29"; this.iconButton29.Size = new Size(44, 46); @@ -8752,6 +8785,11 @@ private void InitializeComponent() // // groupBox30 // + groupBox30.Controls.Add(labelStyleExagg); + groupBox30.Controls.Add(trackBarStyleExaggeration); + groupBox30.Controls.Add(label202); + groupBox30.Controls.Add(label200); + groupBox30.Controls.Add(this.rjToggleSpeakerBoost); groupBox30.Controls.Add(button51); groupBox30.Controls.Add(labelStability); groupBox30.Controls.Add(labelSimboost); @@ -8765,21 +8803,79 @@ private void InitializeComponent() groupBox30.Controls.Add(comboBoxLabsModelID); groupBox30.Controls.Add(this.iconButton54); groupBox30.ForeColor = Color.White; - groupBox30.Location = new Point(18, 171); + groupBox30.Location = new Point(18, 142); groupBox30.Margin = new Padding(3, 2, 3, 2); groupBox30.Name = "groupBox30"; groupBox30.Padding = new Padding(3, 2, 3, 2); - groupBox30.Size = new Size(725, 360); + groupBox30.Size = new Size(725, 449); groupBox30.TabIndex = 127; groupBox30.TabStop = false; groupBox30.Text = "Eleven Labs Customization"; // + // labelStyleExagg + // + labelStyleExagg.AutoSize = true; + labelStyleExagg.ForeColor = Color.Snow; + labelStyleExagg.Location = new Point(664, 297); + labelStyleExagg.Name = "labelStyleExagg"; + labelStyleExagg.Size = new Size(23, 15); + labelStyleExagg.TabIndex = 195; + labelStyleExagg.Text = "0%"; + // + // trackBarStyleExaggeration + // + trackBarStyleExaggeration.LargeChange = 10; + trackBarStyleExaggeration.Location = new Point(10, 315); + trackBarStyleExaggeration.Maximum = 100; + trackBarStyleExaggeration.Name = "trackBarStyleExaggeration"; + trackBarStyleExaggeration.Size = new Size(694, 45); + trackBarStyleExaggeration.TabIndex = 194; + trackBarStyleExaggeration.TickFrequency = 2; + trackBarStyleExaggeration.Scroll += this.trackBarStyleExaggeration_Scroll; + // + // label202 + // + label202.AutoSize = true; + label202.ForeColor = Color.Snow; + label202.Location = new Point(12, 297); + label202.Name = "label202"; + label202.Size = new Size(104, 15); + label202.TabIndex = 193; + label202.Text = "Style Exaggeration"; + // + // label200 + // + label200.AutoSize = true; + label200.ForeColor = Color.Snow; + label200.Location = new Point(57, 375); + label200.Name = "label200"; + label200.Size = new Size(81, 15); + label200.TabIndex = 192; + label200.Text = "Speaker Boost"; + // + // rjToggleSpeakerBoost + // + this.rjToggleSpeakerBoost.AutoSize = true; + this.rjToggleSpeakerBoost.Checked = true; + this.rjToggleSpeakerBoost.CheckState = CheckState.Checked; + this.rjToggleSpeakerBoost.Location = new Point(12, 373); + this.rjToggleSpeakerBoost.Margin = new Padding(3, 2, 3, 2); + this.rjToggleSpeakerBoost.MinimumSize = new Size(39, 16); + this.rjToggleSpeakerBoost.Name = "rjToggleSpeakerBoost"; + this.rjToggleSpeakerBoost.OffBackColor = Color.Gray; + this.rjToggleSpeakerBoost.OffToggleColor = Color.Gainsboro; + this.rjToggleSpeakerBoost.OnBackColor = Color.MediumSlateBlue; + this.rjToggleSpeakerBoost.OnToggleColor = Color.WhiteSmoke; + this.rjToggleSpeakerBoost.Size = new Size(39, 16); + this.rjToggleSpeakerBoost.TabIndex = 191; + this.rjToggleSpeakerBoost.UseVisualStyleBackColor = true; + // // button51 // button51.BackColor = Color.FromArgb((int)((byte)(31)), (int)((byte)(30)), (int)((byte)(68))); button51.FlatStyle = FlatStyle.Flat; button51.ForeColor = Color.Snow; - button51.Location = new Point(12, 315); + button51.Location = new Point(12, 401); button51.Margin = new Padding(3, 2, 3, 2); button51.Name = "button51"; button51.Size = new Size(96, 30); @@ -8796,7 +8892,7 @@ private void InitializeComponent() labelStability.Name = "labelStability"; labelStability.Size = new Size(29, 15); labelStability.TabIndex = 189; - labelStability.Text = "75%"; + labelStability.Text = "50%"; // // labelSimboost // @@ -8839,7 +8935,7 @@ private void InitializeComponent() trackBarStability.Size = new Size(694, 45); trackBarStability.TabIndex = 187; trackBarStability.TickFrequency = 2; - trackBarStability.Value = 75; + trackBarStability.Value = 50; trackBarStability.Scroll += this.trackBarStability_Scroll; // // label174 @@ -8891,7 +8987,7 @@ private void InitializeComponent() comboBoxLabsModelID.DropDownStyle = ComboBoxStyle.DropDownList; comboBoxLabsModelID.FlatStyle = FlatStyle.Flat; comboBoxLabsModelID.FormattingEnabled = true; - comboBoxLabsModelID.Items.AddRange(new object[] { "eleven_monolingual_v1", "eleven_multilingual_v1" }); + comboBoxLabsModelID.Items.AddRange(new object[] { "eleven_monolingual_v1", "eleven_multilingual_v1", "eleven_multilingual_v2" }); comboBoxLabsModelID.Location = new Point(21, 40); comboBoxLabsModelID.Margin = new Padding(3, 2, 3, 2); comboBoxLabsModelID.Name = "comboBoxLabsModelID"; @@ -9983,33 +10079,6 @@ private void InitializeComponent() button45.UseVisualStyleBackColor = true; button45.Click += this.button45_Click; // - // label199 - // - label199.AutoSize = true; - label199.BackColor = Color.FromArgb((int)((byte)(68)), (int)((byte)(72)), (int)((byte)(111))); - label199.ForeColor = Color.Snow; - label199.Location = new Point(60, 150); - label199.Name = "label199"; - label199.Size = new Size(251, 15); - label199.TabIndex = 126; - label199.Text = "Show Spotify Connect URI in Log (don't share)"; - // - // rjToggleShowConnectURISpotify - // - this.rjToggleShowConnectURISpotify.AutoSize = true; - this.rjToggleShowConnectURISpotify.BackColor = Color.FromArgb((int)((byte)(255)), (int)((byte)(255)), (int)((byte)(192))); - this.rjToggleShowConnectURISpotify.Location = new Point(16, 150); - this.rjToggleShowConnectURISpotify.Margin = new Padding(3, 2, 3, 2); - this.rjToggleShowConnectURISpotify.MinimumSize = new Size(39, 16); - this.rjToggleShowConnectURISpotify.Name = "rjToggleShowConnectURISpotify"; - this.rjToggleShowConnectURISpotify.OffBackColor = Color.Gray; - this.rjToggleShowConnectURISpotify.OffToggleColor = Color.Gainsboro; - this.rjToggleShowConnectURISpotify.OnBackColor = Color.MediumSlateBlue; - this.rjToggleShowConnectURISpotify.OnToggleColor = Color.WhiteSmoke; - this.rjToggleShowConnectURISpotify.Size = new Size(39, 16); - this.rjToggleShowConnectURISpotify.TabIndex = 127; - this.rjToggleShowConnectURISpotify.UseVisualStyleBackColor = false; - // // VoiceWizardWindow // this.AutoScaleDimensions = new SizeF(7F, 15F); @@ -10152,6 +10221,7 @@ private void InitializeComponent() elevenLabs.PerformLayout(); groupBox30.ResumeLayout(false); groupBox30.PerformLayout(); + ((global::System.ComponentModel.ISupportInitialize)(trackBarStyleExaggeration)).EndInit(); ((global::System.ComponentModel.ISupportInitialize)(trackBarSimilarity)).EndInit(); ((global::System.ComponentModel.ISupportInitialize)(trackBarStability)).EndInit(); groupBox39.ResumeLayout(false); @@ -10825,6 +10895,11 @@ private void InitializeComponent() public TextBox WebsocketServerPortText; private Label label199; public global::OSCVRCWiz.RJControls.RJToggleButton rjToggleShowConnectURISpotify; + private Label label200; + public global::OSCVRCWiz.RJControls.RJToggleButton rjToggleSpeakerBoost; + private Label labelStyleExagg; + public TrackBar trackBarStyleExaggeration; + private Label label202; // public FontAwesome.Sharp.IconButton iconButton2; } } \ No newline at end of file diff --git a/OSCVRCWiz/VoiceWizardWindow.cs b/OSCVRCWiz/VoiceWizardWindow.cs index 5662c54a..dbf4dcbe 100644 --- a/OSCVRCWiz/VoiceWizardWindow.cs +++ b/OSCVRCWiz/VoiceWizardWindow.cs @@ -1088,6 +1088,7 @@ public void updateAllTrackBarLabels() labelStability.Text = trackBarStability.Value + "%"; labelSimboost.Text = trackBarSimilarity.Value + "%"; + labelStyleExagg.Text = trackBarStyleExaggeration.Value + "%"; } #region Voice Presets @@ -2136,6 +2137,27 @@ private void buttonExportMedia_Click(object sender, EventArgs e) #region OSCListener + private void button20_Click(object sender, EventArgs e) + { + WebSocketServer.ToggleServer(); + } + + private void label195_Click(object sender, EventArgs e) + { + System.Diagnostics.Process.Start("explorer.exe", "https://vrcwizard.github.io/TTS-Voice-Wizard-React/"); + } + + private void iconButton5_Click_1(object sender, EventArgs e) + { + System.Diagnostics.Process.Start("explorer.exe", "https://github.com/VRCWizard/TTS-Voice-Wizard/wiki/OSC-Listener#websocket-to-text-to-speech"); + } + + private void button3_Click_1(object sender, EventArgs e) + { + WebSocketServer.WebSocketServerPort = WebsocketServerPortText.Text.ToString(); + } + + private void buttonPulsoidConnect_Click(object sender, EventArgs e) { if (!HeartratePulsoid.pulsoidEnabled) @@ -2818,15 +2840,23 @@ private void trackBarSimilarity_Scroll(object sender, EventArgs e) labelSimboost.Text = trackBarSimilarity.Value + "%"; } + private void trackBarStyleExaggeration_Scroll(object sender, EventArgs e) + { + labelStyleExagg.Text = trackBarStyleExaggeration.Value + "%"; + } + private void button51_Click(object sender, EventArgs e) { comboBoxLabsModelID.SelectedIndex = 0; comboBoxLabsOptimize.SelectedIndex = 0; - trackBarStability.Value = 75; + trackBarStability.Value = 50; trackBarSimilarity.Value = 75; + trackBarStyleExaggeration.Value = 0; labelStability.Text = trackBarStability.Value + "%"; labelSimboost.Text = trackBarSimilarity.Value + "%"; + labelStyleExagg.Text = trackBarStyleExaggeration.Value + "%"; + rjToggleSpeakerBoost.Checked = true; } @@ -3040,25 +3070,8 @@ private void whisperLink_Click(object sender, EventArgs e) #endregion #endregion - private void button20_Click(object sender, EventArgs e) - { - WebSocketServer.ToggleServer(); - } - - private void label195_Click(object sender, EventArgs e) - { - System.Diagnostics.Process.Start("explorer.exe", "https://vrcwizard.github.io/TTS-Voice-Wizard-React/"); - } - private void iconButton5_Click_1(object sender, EventArgs e) - { - System.Diagnostics.Process.Start("explorer.exe", "https://github.com/VRCWizard/TTS-Voice-Wizard/wiki/OSC-Listener#websocket-to-text-to-speech"); - } - private void button3_Click_1(object sender, EventArgs e) - { - WebSocketServer.WebSocketServerPort = WebsocketServerPortText.Text.ToString(); - } }