Skip to content

Commit

Permalink
Various Fixes/ Features (v0.3.2)
Browse files Browse the repository at this point in the history
  • Loading branch information
VRCWizard authored Apr 16, 2022
1 parent 7bc452e commit 9b05859
Show file tree
Hide file tree
Showing 4 changed files with 141 additions and 51 deletions.
4 changes: 2 additions & 2 deletions OutputText.cs
Original file line number Diff line number Diff line change
Expand Up @@ -552,10 +552,10 @@ public async void outputVRChat(VoiceWizardWindow MainForm, string textstring)
Task.Delay(MainForm.eraseDelay).Wait();

message0 = new SharpOSC.OscMessage("/avatar/parameters/KAT_Visible", false);
message1 = new SharpOSC.OscMessage("/avatar/parameters/KAT_Pointer", 255);
// message1 = new SharpOSC.OscMessage("/avatar/parameters/KAT_Pointer", 255); HIDE TEXT SHOULD NOT CLEAR TEXT, THIS WILL FIX THE ISSUE OF DELAYED HIDE

sender2.Send(message0);
sender2.Send(message1);
/// sender2.Send(message1);
}
// currentlyPrinting = false; //does not work as intended, look into sharing betwwen threads possibly?
// int startingPoint = stringPoint;
Expand Down
22 changes: 15 additions & 7 deletions TextSynthesis.cs
Original file line number Diff line number Diff line change
Expand Up @@ -130,12 +130,15 @@ public static async void speechTTTS(VoiceWizardWindow MainForm, string fromLangu
{
ot.outputLog(MainForm, MainForm.dictationString);
}
AudioSynthesis.SynthesizeAudioAsync(MainForm.dictationString, emotion, rate, pitch, volume, voice);
if (MainForm.checkBox10.Checked == false)
{
Task.Run(() => AudioSynthesis.SynthesizeAudioAsync(MainForm.dictationString, emotion, rate, pitch, volume, voice));
}
//Send Text to Vrchat
if (MainForm.checkBox1.Checked == true)
{
ot.outputVRChat(MainForm, MainForm.dictationString);
// Task.Run(() => ot.outputVRChat(MainForm, MainForm.dictationString));
//ot.outputVRChat(MainForm, MainForm.dictationString);
Task.Run(() => ot.outputVRChat(MainForm, MainForm.dictationString));
}
//Send Text to TTS

Expand Down Expand Up @@ -313,21 +316,26 @@ public static async void translationSTTTS(VoiceWizardWindow MainForm,string toLa
var ot = new OutputText();
if (MainForm.checkBox2.Checked == true)
{
ot.outputLog(MainForm, MainForm.dictationString + " [" + fromLanguage+ ">"+ toLanguage + "]: " + "[" + translatedString + "]");
ot.outputLog(MainForm, MainForm.dictationString + " [" + fromLanguage+ ">"+ toLanguage + "]: " + "[" + translatedString + "]");
}
//Send Text to TTS
AudioSynthesis.SynthesizeAudioAsync(translatedString, emotion, rate, pitch, volume, voice);
if (MainForm.checkBox10.Checked == false)
{
Task.Run(() => AudioSynthesis.SynthesizeAudioAsync(translatedString, emotion, rate, pitch, volume, voice));

}

//Send Text to Vrchat
if (MainForm.checkBox1.Checked == true)
{
if (MainForm.checkBox7.Checked == true)
{
ot.outputVRChat(MainForm, translatedString + "[" + fromLanguage + " > " + toLanguage + "]");
Task.Run(() => ot.outputVRChat(MainForm, translatedString + "[" + fromLanguage + " > " + toLanguage + "]"));

}
else
{
ot.outputVRChat(MainForm, MainForm.dictationString + "[" + fromLanguage + " > " + toLanguage + "]");
Task.Run(() => ot.outputVRChat(MainForm, MainForm.dictationString + "[" + fromLanguage + " > " + toLanguage + "]"));

}

Expand Down
Loading

0 comments on commit 9b05859

Please sign in to comment.