Senin, 05 Januari 2015

Membuat Komputer Berbicara Di VB.NET



  • Pilih File - > New Project - > Windows Form Application - > beri nama komputer berbicara
  • tambahkan 1 buah textbox,1 buah trackbar,1buah button,dan 2 buah label
  • ubah tampilan seperti ini atau sesuai keinginan anda :

  • Ubah properties :
    Form1

    text = Komputer Berbicara

    label1

    text = Slow

    label2

    text = fast

    button1

    text = speak

     


setelah itu masukan coding sebagai berikut :


public class form1
private sub button1_click(sender as system.object, e as system.eventargs) handles button1.click
              dim sapi
              sapi = createobject("sapi.spvoice")
              sapi.rate = trackbar1.value
              sapi.speak(textbox1.text)
end sub
end class

Tidak ada komentar:

Posting Komentar