İNGİLİZCE METNİ SESLİ OKUTMA PROGRAMI

Öncelikle; Solution Explorer penceresinde Reference üzerinde sağ tıklayarak Add Reference seçiyoruz.
Karşımıza gelen pencereden COM bölümünden "Microsoft Speech Object Library" işaretliyoruz. Ve kütüphane bölümüne " using SpeechLib; " bu kütüphaneyi eklemeyi unutmuyoruz. Şimdi kodlayalım.

            
              (TEXTBOX(multiline) ve BUTTON kullanıldı)

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using SpeechLib;
using System.Windows.Forms;

namespace ingilizce_okutma
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            SpVoice oku = new SpVoice();
            oku.Speak(textBox1.Text, SpeechVoiceSpeakFlags.SVSFDefault);
        }
    }
}


...






Yorumlar

Popüler Yayınlar