Skip to content

Commit

Permalink
Update Program.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
ararTP authored May 3, 2023
1 parent 9df47fc commit 7705dff
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,19 @@ class Program
static void PrintHelp() {
Console.WriteLine("sapicli guide:");
Console.WriteLine("\t--help, -h to display this message\n");
Console.WriteLine("\t--ssml to specify the speech text uses SSML (off by default).\n");
Console.WriteLine("\t-l[=<culture>] to list all available voices culture. eg '-l=en_US' to display american english voices or '-l' to display all. culture is type of https://learn.microsoft.com/en-us/dotnet/api/system.globalization.cultureinfo.-ctor?view=netframework-4.8.1#system-globalization-cultureinfo-ctor(system-string) \n");
Console.WriteLine("\t-v <voiceName> to select a voice. https://learn.microsoft.com/en-us/dotnet/api/system.speech.synthesis.speechsynthesizer.selectvoice \n");
Console.WriteLine("\t-r <rate> to choose speech rate. (-10 <= integer <= 10). https://learn.microsoft.com/en-us/dotnet/api/system.speech.synthesis.speechsynthesizer.rate \n");
Console.WriteLine("\t-a <volume> to change speech volume (0 <= integer <= 100). https://learn.microsoft.com/en-us/dotnet/api/system.speech.synthesis.speechsynthesizer.volume \n");
Console.WriteLine("\t-w <wavOutputPath> to save speech to wav. https://learn.microsoft.com/en-us/dotnet/api/system.speech.synthesis.speechsynthesizer.setoutputtowavefile \n");
Console.WriteLine("\t-t <text> to set the speech text.\n");
Console.WriteLine("\t-f <pathToInputFile> to set the speech text to file content.\n");
Console.WriteLine("\t--ssml to specify the speech text uses SSML (off by default).\n");
System.Environment.Exit(1);
}
static void PrintAvailVoices(SpeechSynthesizer synth)
{
//src https://learn.microsoft.com/en-us/dotnet/api/system.speech.synthesis.speechsynthesizer.getinstalledvoices?view=netframework-4.8.1
foreach (InstalledVoice voice in synth.GetInstalledVoices())
{
VoiceInfo info = voice.VoiceInfo;
Expand Down Expand Up @@ -62,6 +63,7 @@ static void PrintAvailVoices(SpeechSynthesizer synth)
}
static void PrintAvailVoices(SpeechSynthesizer synth,String culture)
{
//src https://learn.microsoft.com/en-us/dotnet/api/system.speech.synthesis.speechsynthesizer.getinstalledvoices?view=netframework-4.8.1
foreach (InstalledVoice voice in synth.GetInstalledVoices(new CultureInfo(culture)))
{
VoiceInfo info = voice.VoiceInfo;
Expand Down

0 comments on commit 7705dff

Please sign in to comment.