Public feed #890691

Something

public text v1 · immutable
Raw Edit
·published 2008-02-03 23:23 UTC
rendered paste body
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using SpeechLib;

namespace TextToVoice
{
    public partial class Form1 : Form
    {

        SpVoice voice = new SpVoice();
        
        public Form1()
        {
            InitializeComponent();
        }

        private void SpeakButton_Click(object sender, EventArgs e)
        {
            if (this.SpeakTextBox.Text.Length == 0)
                MessageBox.Show("Enter text");
            else
            {
                voice.Speak(SpeakTextBox.Text, SpeechVoiceSpeakFlags.SVSFlagsAsync);
            }
        }

        private void StopButton_Click(object sender, EventArgs e)
        {
            voice.Skip(SpeakTextBox.Text.ToString(), SpeakTextBox.Text.Length);
        }
    }
}