Código:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using SpeechLib;
namespace PruebaDeVoz
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
SpVoice v = new SpVoice();
private void button1_Click(object sender, EventArgs e)
{
v.Voice = v.GetVoices().Item(listBox1.SelectedIndex);
v.Speak(textBox1.Text);
}
private void Form1_Load(object sender, EventArgs e)
{
foreach (ISpeechObjectToken voz in v.GetVoices())
{
listBox1.Items.Add(voz.GetDescription());
}
}
}
}
Espero que le sea de utilidad esta entrada, podrán darse cuenta que es realmente sencillo sintetizar voz gracias a la tecnología Microsoft.
No hay comentarios:
Publicar un comentario