Skip to content

Commit

Permalink
v1.5.6.5
Browse files Browse the repository at this point in the history
Hot Fix
  • Loading branch information
VRCWizard authored Sep 10, 2023
1 parent 5a17411 commit f43709a
Show file tree
Hide file tree
Showing 5 changed files with 68 additions and 20 deletions.
2 changes: 1 addition & 1 deletion OSCVRCWiz/Resources/StartUp/Updater.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ namespace OSCVRCWiz.Resources.StartUp
public class Updater
{

public static string currentVersion = "1.5.6.1";
public static string currentVersion = "1.5.6.5";
public static string updateXMLName = "https://github.com/VRCWizard/TTS-Voice-Wizard/releases/latest/download/AutoUpdater-x64.xml";

public static async void getGithubInfo()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ public static void speechSetup(string toLanguageFullname, string fromLanguageFul
translationConfig = SpeechTranslationConfig.FromSubscription(YourSubscriptionKey, YourServiceRegion);
// speechConfig.SetProperty(PropertyId.Speech_LogFilename, "logfile.txt"); //This line of code was the cause for an outstanding bug, if the log file becomes too full it causes issue. Further testing required before adding logging back as a feature.
fromLanguage = LanguageSelect.fromLanguageNew(fromLanguageFullname, "sourceLanguage", "Azure");
toLanguage = LanguageSelect.fromLanguageNew(toLanguageFullname, "targetLanguage", "Azure");
toLanguage = LanguageSelect.fromLanguageNew(toLanguageFullname, "targetLanguage", "Pro");
// fromLanguageID(fromLanguageFullname); //Convert information from selected spoken language and sets fromLanuage to the ID
// toLanguageID(toLanguageFullname);//Convert information from selected translation language and sets toLanuage to the ID

Expand Down Expand Up @@ -336,6 +336,7 @@ public static async void translationSTTTS(string toLanguageFullname, string from
System.Diagnostics.Debug.WriteLine($"we'll translate into '{toLanguage}'.\n");
if (VoiceWizardWindow.MainFormGlobal.rjToggleButton4.Checked == false)
{
DoSpeech.speechToTextOnSound();
if (VoiceWizardWindow.MainFormGlobal.rjToggleButtonChatBox.Checked == true)
{
OSCListener.pauseBPM = true;
Expand Down Expand Up @@ -366,7 +367,7 @@ public static async void translationSTTTS(string toLanguageFullname, string from


TTSMessageQueue.QueueMessage(text, "Azure Translate", translatedString);

DoSpeech.speechToTextButtonOff();

}
if (VoiceWizardWindow.MainFormGlobal.rjToggleButton4.Checked == true && continuousListening == false)
Expand Down
36 changes: 35 additions & 1 deletion OSCVRCWiz/Services/Speech/TextToSpeech/TTSEngines/UberDuckTTS.cs
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,21 @@ public static async Task SynthesisGetAvailableVoicesAsync(string currentCategory
{
VoiceWizardWindow.MainFormGlobal.comboBoxAccentSelect.Items.Add(cat);
}


}

if (changedMethods)
{
VoiceWizardWindow.MainFormGlobal.comboBoxAccentSelect.SelectedIndex = 0;
VoiceWizardWindow.MainFormGlobal.comboBoxVoiceSelect.Items.Clear();
}

if (currentCategory == "")
{

currentCategory = VoiceWizardWindow.MainFormGlobal.comboBoxAccentSelect.Text.ToString();
}

foreach (KeyValuePair<string, string> voice in UberNameAndCategory)
{
Expand All @@ -132,11 +145,28 @@ public static async Task SynthesisGetAvailableVoicesAsync(string currentCategory
//Console.WriteLine("Voice " + voice.Key + " belongs to category " + currentCategory);
VoiceWizardWindow.MainFormGlobal.comboBoxVoiceSelect.Items.Add(voice.Key);
}

}





}
try
{
if (VoiceWizardWindow.MainFormGlobal.comboBoxVoiceSelect != null)
{


VoiceWizardWindow.MainFormGlobal.comboBoxVoiceSelect.SelectedIndex = 0;
}
}
catch (Exception ex)
{
OutputText.outputLog("[Uberduck Voice Load Error: "+ex.Message+"]", Color.Red);
}

VoiceWizardWindow.MainFormGlobal.comboBoxVoiceSelect.SelectedIndex = 0;



Expand Down Expand Up @@ -259,10 +289,14 @@ public static async void UberPlayAudio(string audioString, TTSMessage TTSMessage
public static void SetVoices(ComboBox voices, ComboBox styles, ComboBox accents)
{
accents.Items.Clear();
voices.Items.Clear();
UberDuckTTS.SynthesisGetAvailableVoicesAsync(accents.Text.ToString(), true);

styles.SelectedIndex = 0;
styles.Enabled = false;
voices.Enabled = true;

// accents.SelectedIndex = 0;
}

}
Expand Down
7 changes: 7 additions & 0 deletions OSCVRCWiz/Services/Speech/TranslationAPIs/DeepLTranslate.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,13 @@ public static async Task<string> translateTextDeepL(string text)
var from = LanguageSelect.fromLanguageNew(fullFromLanguage, "sourceLanguage", "DeepL");
var to = LanguageSelect.fromLanguageNew(fullToLanguage, "targetLanguage", "DeepL");

switch (to)
{

case "en": to = "en-US"; break;
}


var translatedText = await translator.TranslateTextAsync(text, from, to);
System.Diagnostics.Debug.WriteLine(translatedText);
//System.Diagnostics.Debug.WriteLine(LanguageCode.English);
Expand Down
38 changes: 22 additions & 16 deletions OSCVRCWiz/VoiceWizardWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -705,47 +705,48 @@ private void comboBoxTTSMode_SelectedIndexChanged(object sender, EventArgs e)
switch (comboBoxTTSMode.Text.ToString())
{
case "Moonbase":
DoSpeech.TTSModeSaved = "Moonbase";
MoonbaseTTS.SetVoices(comboBoxVoiceSelect, comboBoxStyleSelect);
comboBoxTranslationLanguage.Enabled = true;
comboBoxAccentSelect.Enabled = false;
trackBarPitch.Enabled = true;
trackBarVolume.Enabled = true;
trackBarSpeed.Enabled = true;
DoSpeech.TTSModeSaved = "Moonbase";
trackBarSpeed.Enabled = true;
OutputText.outputLog("[Make sure you have downloaded the Moonbase Voice dependencies: https://github.com/VRCWizard/TTS-Voice-Wizard/wiki/Moonbase-TTS ]", Color.DarkOrange);


break;
case "TikTok":

DoSpeech.TTSModeSaved = "TikTok";
TikTokTTS.SetVoices(comboBoxVoiceSelect, comboBoxStyleSelect);
comboBoxTranslationLanguage.Enabled = true;
comboBoxAccentSelect.Enabled = false;
trackBarPitch.Enabled = true;
trackBarVolume.Enabled = true;
trackBarSpeed.Enabled = true;
DoSpeech.TTSModeSaved = "TikTok";



break;
case "System Speech":
DoSpeech.TTSModeSaved = "System Speech";
SystemSpeechTTS.SetVoices(comboBoxVoiceSelect, comboBoxStyleSelect);
comboBoxTranslationLanguage.Enabled = true;
comboBoxAccentSelect.Enabled = false;
trackBarPitch.Enabled = true;
trackBarVolume.Enabled = true;
trackBarSpeed.Enabled = true;
DoSpeech.TTSModeSaved = "System Speech";


break;
case "Azure":
DoSpeech.TTSModeSaved = "Azure";
AzureTTS.SetVoices(comboBoxVoiceSelect, comboBoxStyleSelect, comboBoxAccentSelect);
comboBoxTranslationLanguage.Enabled = true;
comboBoxAccentSelect.Enabled = true;
trackBarPitch.Enabled = true;
trackBarVolume.Enabled = true;
trackBarSpeed.Enabled = true;
DoSpeech.TTSModeSaved = "Azure";

if (textBoxAzureKey.Text.ToString() == "" && rjToggleButtonUsePro.Checked == false)
{
Expand All @@ -757,13 +758,14 @@ private void comboBoxTTSMode_SelectedIndexChanged(object sender, EventArgs e)
break;

case "Google (Pro Only)":
DoSpeech.TTSModeSaved = "Google (Pro Only)";
GoogleTTS.SetVoices(comboBoxVoiceSelect, comboBoxStyleSelect, comboBoxAccentSelect);
comboBoxTranslationLanguage.Enabled = true;
comboBoxAccentSelect.Enabled = true;
trackBarPitch.Enabled = true;
trackBarVolume.Enabled = true;
trackBarSpeed.Enabled = true;
DoSpeech.TTSModeSaved = "Google (Pro Only)";


if (textBoxWizardProKey.Text.ToString() == "")
{
Expand All @@ -774,13 +776,13 @@ private void comboBoxTTSMode_SelectedIndexChanged(object sender, EventArgs e)
break;

case "IBM Watson (Pro Only)":
DoSpeech.TTSModeSaved = "IBM Watson (Pro Only)";
IBMWatsonTTS.SetVoices(comboBoxVoiceSelect, comboBoxStyleSelect, comboBoxAccentSelect);
comboBoxTranslationLanguage.Enabled = true;
comboBoxAccentSelect.Enabled = true;
trackBarPitch.Enabled = true;
trackBarVolume.Enabled = true;
trackBarSpeed.Enabled = true;
DoSpeech.TTSModeSaved = "IBM Watson (Pro Only)";

if (textBoxWizardProKey.Text.ToString() == "")
{
Expand All @@ -791,19 +793,23 @@ private void comboBoxTTSMode_SelectedIndexChanged(object sender, EventArgs e)
break;

case "Uberduck":
DoSpeech.TTSModeSaved = "Uberduck";
UberDuckTTS.SetVoices(comboBoxVoiceSelect, comboBoxStyleSelect, comboBoxAccentSelect);
comboBoxTranslationLanguage.Enabled = true;
comboBoxAccentSelect.Enabled = true;
trackBarPitch.Enabled = true;
trackBarVolume.Enabled = true;
trackBarSpeed.Enabled = true;
DoSpeech.TTSModeSaved = "Uberduck";
trackBarSpeed.Enabled = true;

if (textBoxUberKey.Text.ToString() == "")
{
OutputText.outputLog("[You appear to be missing an Uberduck Key: https://github.com/VRCWizard/TTS-Voice-Wizard/wiki/Uberduck-TTS ]", Color.DarkOrange);
}

break;

case "Locally Hosted":

DoSpeech.TTSModeSaved = "Locally Hosted";
comboBoxVoiceSelect.Items.Clear();
comboBoxVoiceSelect.Items.Add("Local 1");
comboBoxVoiceSelect.SelectedIndex = 0;
Expand All @@ -817,22 +823,22 @@ private void comboBoxTTSMode_SelectedIndexChanged(object sender, EventArgs e)
trackBarPitch.Enabled = true;
trackBarVolume.Enabled = true;
trackBarSpeed.Enabled = true;
DoSpeech.TTSModeSaved = "Locally Hosted";


OutputText.outputLog("[Here is an example of a project that can be used with Local: https://github.com/VRCWizard/TTS-Voice-Wizard/wiki/Glados-TTS . This method works by sending a GET request to http://127.0.0.1:8124/synthesize/ with the string parameter 'text'. If you create compatible projects or models, feel free to share them in the Discord server.]", Color.DarkOrange);

break;

case "ElevenLabs":
DoSpeech.TTSModeSaved = "ElevenLabs";

ElevenLabsTTS.SetVoices(comboBoxVoiceSelect, comboBoxStyleSelect);

comboBoxTranslationLanguage.Enabled = true;
comboBoxAccentSelect.Enabled = false;
trackBarPitch.Enabled = true;
trackBarVolume.Enabled = true;
trackBarSpeed.Enabled = true;
DoSpeech.TTSModeSaved = "ElevenLabs";
trackBarSpeed.Enabled = true;

if (textBoxElevenLabsKey.Text.ToString() == "")
{
Expand All @@ -843,15 +849,15 @@ private void comboBoxTTSMode_SelectedIndexChanged(object sender, EventArgs e)


case "Amazon Polly":

DoSpeech.TTSModeSaved = "Amazon Polly";
AmazonPollyTTS.SetVoices(comboBoxVoiceSelect, comboBoxStyleSelect, comboBoxAccentSelect);

comboBoxTranslationLanguage.Enabled = true;
comboBoxAccentSelect.Enabled = true;
trackBarPitch.Enabled = true;
trackBarVolume.Enabled = true;
trackBarSpeed.Enabled = true;
DoSpeech.TTSModeSaved = "Amazon Polly";


if (textBoxAmazonKey.Text.ToString() == "" && rjToggleButtonUsePro.Checked == false)
{
Expand Down

0 comments on commit f43709a

Please sign in to comment.