Created
March 23, 2018 12:47
-
-
Save Fhernd/ec0834b8b97afebd4cba52bbe198ca4e to your computer and use it in GitHub Desktop.
Sintetización de voz. OrtizOL.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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