Skip to content

Instantly share code, notes, and snippets.

@Fhernd
Created March 23, 2018 12:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Fhernd/ec0834b8b97afebd4cba52bbe198ca4e to your computer and use it in GitHub Desktop.
Save Fhernd/ec0834b8b97afebd4cba52bbe198ca4e to your computer and use it in GitHub Desktop.
Sintetización de voz. OrtizOL.
using System;
using System.Speech.Synthesis;
namespace R819TextoAVoz
{
class Programa
{
static void Main(string[] args)
{
SpeechSynthesizer sintetizadorVoz = new SpeechSynthesizer();
Console.WriteLine("Voces instaladas en el sistema:\n");
foreach (InstalledVoice voz in sintetizadorVoz.GetInstalledVoices())
{
Console.WriteLine("Voz: {0}", voz.VoiceInfo.Name);
Console.WriteLine("Género: {0}", voz.VoiceInfo.Gender);
Console.WriteLine("Edad: {0}", voz.VoiceInfo.Age);
Console.WriteLine("Cultura: {0}", voz.VoiceInfo.Culture);
Console.WriteLine("Descripción: {0}", voz.VoiceInfo.Description);
Console.WriteLine();
}
Console.WriteLine("Pronunciar:\n");
while (true)
{
Console.WriteLine("Escriba la cadena a pronunciar:");
sintetizadorVoz.Speak(Console.ReadLine());
Console.WriteLine("Completada.");
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment