Skip to content

Commit

Permalink
More Voices
Browse files Browse the repository at this point in the history
more voices added 
other small fixes
  • Loading branch information
VRCWizard authored Apr 1, 2022
1 parent 54858b3 commit 638e5c7
Show file tree
Hide file tree
Showing 3 changed files with 92 additions and 24 deletions.
85 changes: 62 additions & 23 deletions AudioSynthesis.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,29 +9,7 @@ namespace OSCVRCWiz
{
public class AudioSynthesis
{
/* public static void OutputSpeechRecognitionResult(SpeechRecognitionResult speechRecognitionResult) //STT
{
switch (speechRecognitionResult.Reason)
{
case ResultReason.RecognizedSpeech:
System.Diagnostics.Debug.WriteLine($"RECOGNIZED: Text={speechRecognitionResult.Text}");
break;
case ResultReason.NoMatch:
System.Diagnostics.Debug.WriteLine($"NOMATCH: Speech could not be recognized.");
break;
case ResultReason.Canceled:
var cancellation = CancellationDetails.FromResult(speechRecognitionResult);
System.Diagnostics.Debug.WriteLine($"CANCELED: Reason={cancellation.Reason}");
if (cancellation.Reason == CancellationReason.Error)
{
System.Diagnostics.Debug.WriteLine($"CANCELED: ErrorCode={cancellation.ErrorCode}");
System.Diagnostics.Debug.WriteLine($"CANCELED: ErrorDetails={cancellation.ErrorDetails}");
System.Diagnostics.Debug.WriteLine($"CANCELED: Double check the speech resource key and region.");
}
break;
}
} */

//TTS
public static async Task SynthesizeAudioAsync(string text, string style, string rate, string pitch, string volume, string voice, int outputIndex) //TTS Outputs through speakers //can not change voice style
{
Expand Down Expand Up @@ -97,6 +75,37 @@ public static async Task SynthesizeAudioAsync(string text, string style, string
string monica = "<voice name=\"en-US-MonicaNeural\">";//15
string davis = "<voice name=\"en-US-DavisNeural\">";//16

string natashaAU = "<voice name=\"en-AU-NatashaNeural\">";//17
string williamAU = "<voice name=\"en-AU-WilliamNeural\">";//18
string claraCA = "<voice name=\"en-CA-ClaraNeural\">";//19
string liamCA = "<voice name=\"en-CA-LiamNeural\">";//20
string soniaUK = "<voice name=\"en-GB-SoniaNeural\">";//21
string ryanUK = "<voice name=\"en-GB-RyanNeural\">";//22


string abbiUK = "<voice name=\"en-GB-AbbiNeural\">";//23
string bellaUK = "<voice name=\"en-GB-BellaNeural\">";//23
string hollieUK = "<voice name=\"en-GB-HollieNeural\">";//24
string oliviaUK = "<voice name=\"en-GB-OliviaNeural\">";//25
string maisieUK = "<voice name=\"en-GB-MaisieNeural\">";//26

string alfieUK = "<voice name=\" en-GB-AlfieNeural\">";//
string elliotUK = "<voice name=\"en-GB-ElliotNeural\">";//
string ethanUK = "<voice name=\"en-GB-EthanNeural\">";//
string noahUK = "<voice name=\"en-GB-NoahNeural\">";//
string oliverUK = "<voice name=\"en-GB-OliverNeural\">";//
string thomasUK = "<voice name=\"en-GB-ThomasNeural\">";//

string daliaSpanish_Mexico = "<voice name=\"es-MX-DaliaNeural\">";//
string jorgeSpanish_Mexico = "<voice name=\"es-MX-JorgeNeural\">";//

string brigitteFrench = "<voice name=\"fr-FR-BrigitteNeural\">";//
string jeromeFrench = "<voice name=\"fr-FR-JeromeNeural\">";//

string amalaGerman = "<voice name=\"de-DE-AmalaNeural\">";//
string christophGerman = "<voice name=\"de-DE-ChristophNeural\">";//



System.Diagnostics.Debug.WriteLine(rate);
System.Diagnostics.Debug.WriteLine(pitch);
Expand Down Expand Up @@ -135,6 +144,36 @@ public static async Task SynthesizeAudioAsync(string text, string style, string
case "Monica": ssml0 += monica; ; break;
case "Davis": ssml0 += davis; ; break;

case "Natasha (AU)": ssml0 += natashaAU; ; break;
case "William (AU)": ssml0 += williamAU; ; break;
case "Clara (CA)": ssml0 += claraCA; ; break;
case "Liam (CA)": ssml0 += liamCA; ; break;
case "Sonia (UK)": ssml0 += soniaUK; ; break;
case "Ryan (UK)": ssml0 += ryanUK; ; break;

case "Abbi (UK)": ssml0 += abbiUK; ; break;
case "Bella (UK)": ssml0 += bellaUK; ; break;
case "Hollie (UK)": ssml0 += hollieUK; ; break;
case "Olivia (UK)": ssml0 += oliviaUK; ; break;
case "Maisie (UK)": ssml0 += maisieUK; ; break;

case "Alfie (UK)": ssml0 += alfieUK; ; break;
case "Elliot (UK)": ssml0 += elliotUK; ; break;
case "Ethan (UK)": ssml0 += ethanUK; ; break;
case "Noah (UK)": ssml0 += noahUK; ; break;
case "Oliver (UK)": ssml0 += oliverUK; ; break;
case "Thomas (UK)": ssml0 += thomasUK; ; break;

case "Dalia [Spanish] (MX)": ssml0 += daliaSpanish_Mexico; ; break;
case "Jorge [Spanish] (MX)": ssml0 += jorgeSpanish_Mexico; ; break;

case "Brigitte [French]": ssml0 += brigitteFrench; ; break;
case "Jerome [French]": ssml0 += jeromeFrench; ; break;

case "Amala [German]": ssml0 += amalaGerman; ; break;
case "Christoph [German]": ssml0 += christophGerman; ; break;



default: ssml0 += "<voice name=\"en-US-SaraNeural\">"; break;
}
Expand Down
6 changes: 6 additions & 0 deletions OutputText.cs
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,12 @@ public async void outputVRChat(VoiceWizardWindow MainForm, string textstring)
case '$': letter = 0.031496063f; break;
case '\'': letter = 0.05511811f; break;
case '.': letter = 0.11023622f; break;

case ',': letter = 0.09448819f; break;
case ':': letter = 0.20472442f; break;
case ';': letter = 0.21259843f; break;
case '!': letter = 0.007874016f; break;

case ' ': letter = 0.0f; break;
case '?': letter = 0.24409449f; break;

Expand Down
25 changes: 24 additions & 1 deletion VoiceWizardWindow.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 638e5c7

Please sign in to comment.