Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. using System;
  2. using System.Speech.Synthesis;
  3.  
  4. namespace R819TextoAVoz
  5. {
  6.     class Programa
  7.     {
  8.         static void Main(string[] args)
  9.         {
  10.             SpeechSynthesizer sintetizadorVoz = new SpeechSynthesizer();
  11.  
  12.             Console.WriteLine("Voces instaladas en el sistema:\n");
  13.  
  14.             foreach (InstalledVoice voz in sintetizadorVoz.GetInstalledVoices())
  15.             {
  16.                 Console.WriteLine("Voz: {0}", voz.VoiceInfo.Name);
  17.                 Console.WriteLine("Género: {0}", voz.VoiceInfo.Gender);
  18.                 Console.WriteLine("Edad: {0}", voz.VoiceInfo.Age);
  19.                 Console.WriteLine("Cultura: {0}", voz.VoiceInfo.Culture);
  20.                 Console.WriteLine("Descripción: {0}", voz.VoiceInfo.Description);
  21.                 Console.WriteLine();
  22.             }
  23.  
  24.             Console.WriteLine("Pronunciar:\n");
  25.  
  26.             while (true)
  27.             {
  28.                 Console.WriteLine("Escriba la cadena a pronunciar:");
  29.                 sintetizadorVoz.Speak(Console.ReadLine());
  30.                 Console.WriteLine("Completada.");
  31.             }
  32.         }
  33.     }
  34. }