Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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.");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement