BAB V KESIMPULAN DAN SARAN
5.2 Saran
Kekurangan dari aplikasi ini adalah pengguna harus memasukan kedalam program data yang akan digunakan sebelum dipanggil, pemanggilan suara lebih mudah digunakan ditempat yang tenang, aplikasi ini bersifat close set, artinya aplikasi ini hanya mengenali kata-kata yang berada dalam database, aplikasi ini hanya dapat mengenali perintah dalam sistem operasi Windows.
Dalam pembuatan aplikasi prototype ini, penulis hanya menggunakan beberapa perintah pada windows, penulis belum menyediakan semua program atau aplikasi pada windows secara menyeluruh. Diharapkan nantinya, akan ada yang melanjutkan untuk membuat aplikasi pelengkap untuk melengkapi aplikasi ini. Sehingga, pengguna benar-benar mengoptimalkan suara sebagai alat untuk menjalankan perintah pada windows. Dan dengan ditemukannya metode-metode yang lebih baru dan mudah untuk menganalisis, mengolah dan menampilkan suara sebagai alat untuk menjalankan perintah pada windows. Sehingga, pengguna suara atau sinyal suara dapat dioptimalkan untuk beberapa aplikasi lainnya maupun pada bidang lainnya yang terintegrasi dengan komputer.
DAFTAR PUSTAKA
Natkusumah, E.K., 2002 “ perkembangan teknologi informasi di Indonesia.”,
LIPI Bandung, 2002
Mukhopadhyay M., “speech recognition” 1995
Kristanto, H, 1994 “ Sistem oprasi pembuatan aplikasi” Yogyakarta : Andi
Agustina S, Maria, 2009 “Cara Mudah Menguasai Microsoft Visual C# 2008”, Yogyakarta : andi
Haykin, 1999, “Jaringan saraf tiruan”, Prentice Hall
M.J.Roberts, 2004 “Signals and System Analysis Using Transform Methods and Matlab”, New York : 2004
McGraw-Hill,2004, “Konteks analisa system dan metode perancangan”
Rabiner, L. R., "A Tutorial on Hidden Markov Models and Selected Applications in Speech Recognition, Prov. of IEEE, vol. 77, no. 2, pp. 257-286, 1989.
Rabiner, L. R., and B. H. Juang, "An Introduction to Hidden Markov Models," IEEE ASSP Magazine, vol. 3, no. 1, pp. 4-16, Jan. 1986.
Fathansyah, 1999, “Buku Teks Ilmu Komputer Basis Data”, bandung Penerbit Informatika
Jogianto, 1999. “ Analisis dan Desain”, Yogyakarta : Andi Yogyakarta
Sutedjo, 2002 “ Perencanaan dan Pengembangan Sistem”, Yogyakarta : Andi Yogyakarta
Deitel, Harvey M., Deitel Paul J. 2006. “Visual C# 2008 How to program” 2nd edition.; prentice hall, new jersey
LAMPIRAN
using System; using System.Drawing; using System.Collections; using System.ComponentModel; using System.Windows.Forms; using System.Data; using SpeechLib; namespace SpeechTest { /// <summary>
/// Summary description for Form1. /// </summary>
public class Form1 : System.Windows.Forms.Form {
private System.Windows.Forms.MainMenu mainMenu1; private System.Windows.Forms.MenuItem menuItem1; private System.Windows.Forms.MenuItem menuItem2; private System.Windows.Forms.MenuItem menuItem3; private System.Windows.Forms.MenuItem menuItem4; private System.Windows.Forms.MenuItem menuItem5; private System.Windows.Forms.MenuItem menuItem6; private System.Windows.Forms.MenuItem menuItem7; private System.Windows.Forms.MenuItem menuItem8; private System.Windows.Forms.MenuItem menuItem9; private System.Windows.Forms.MenuItem menuItem10; private System.Windows.Forms.MenuItem menuItem11;
private System.Windows.Forms.Button cmdEnable; private System.Windows.Forms.Button cmdDiable;
private SpeechLib.SpSharedRecoContext objRecoContext = null; private SpeechLib.ISpeechRecoGrammar grammar = null;
private SpeechLib.ISpeechGrammarRule menuRule=null;
private System.Windows.Forms.TextBox txtHyp; private System.Windows.Forms.Label label1; private System.Windows.Forms.Label label2; private System.Windows.Forms.TextBox txtReco; private System.Windows.Forms.Label label3; private System.Windows.Forms.Label label4; private IContainer components;
public Form1()
{
//
// Required for Windows Form Designer support
//
InitializeComponent();
//
// TODO: Add any constructor code after InitializeComponent call
//
}
/// <summary>
/// Clean up any resources being used. /// </summary>
protected override void Dispose( bool disposing )
{ if( disposing ) { if (components != null) { components.Dispose(); } } base.Dispose( disposing ); }
#region Windows Form Designer generated code /// <summary>
/// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
this.mainMenu1 = new
System.Windows.Forms.MainMenu(this.components);
this.menuItem1 = new System.Windows.Forms.MenuItem(); this.menuItem2 = new System.Windows.Forms.MenuItem(); this.menuItem3 = new System.Windows.Forms.MenuItem(); this.menuItem4 = new System.Windows.Forms.MenuItem();
this.menuItem5 = new System.Windows.Forms.MenuItem(); this.menuItem6 = new System.Windows.Forms.MenuItem(); this.menuItem7 = new System.Windows.Forms.MenuItem(); this.menuItem8 = new System.Windows.Forms.MenuItem(); this.menuItem9 = new System.Windows.Forms.MenuItem(); this.menuItem10 = new System.Windows.Forms.MenuItem(); this.menuItem11 = new System.Windows.Forms.MenuItem(); this.cmdEnable = new System.Windows.Forms.Button(); this.cmdDiable = new System.Windows.Forms.Button(); this.txtHyp = new System.Windows.Forms.TextBox(); this.label1 = new System.Windows.Forms.Label(); this.label2 = new System.Windows.Forms.Label(); this.txtReco = new System.Windows.Forms.TextBox(); this.label3 = new System.Windows.Forms.Label(); this.label4 = new System.Windows.Forms.Label(); this.SuspendLayout(); // // mainMenu1 // this.mainMenu1.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] { this.menuItem1, this.menuItem7}); // // menuItem1 // this.menuItem1.Index = 0; this.menuItem1.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] { this.menuItem2, this.menuItem3, this.menuItem4, this.menuItem5, this.menuItem6}); this.menuItem1.Text = "&File"; // // menuItem2 // this.menuItem2.Index = 0; this.menuItem2.Text = "New"; // // menuItem3 lxxxiii
// this.menuItem3.Index = 1; this.menuItem3.Text = "Open"; // // menuItem4 // this.menuItem4.Index = 2; this.menuItem4.Text = "Close"; // // menuItem5 // this.menuItem5.Index = 3; this.menuItem5.Text = "-"; // // menuItem6 // this.menuItem6.Index = 4; this.menuItem6.Text = "Exit"; // // menuItem7 // this.menuItem7.Index = 1; this.menuItem7.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] { this.menuItem8, this.menuItem9, this.menuItem10, this.menuItem11}); this.menuItem7.Text = "&Edit"; // // menuItem8 // this.menuItem8.Index = 0; this.menuItem8.Text = "Cut"; // // menuItem9 // this.menuItem9.Index = 1; this.menuItem9.Text = "&Copy"; // // menuItem10 // lxxxiv
this.menuItem10.Index = 2; this.menuItem10.Text = "&Paste"; // // menuItem11 // this.menuItem11.Index = 3; this.menuItem11.Text = "Delete"; // // cmdEnable //
this.cmdEnable.Location = new System.Drawing.Point(16, 16); this.cmdEnable.Name = "cmdEnable";
this.cmdEnable.Size = new System.Drawing.Size(96, 23); this.cmdEnable.TabIndex = 0;
this.cmdEnable.Text = "Enable Speech";
this.cmdEnable.Click += new
System.EventHandler(this.cmdEnable_Click); //
// cmdDiable //
this.cmdDiable.Location = new System.Drawing.Point(152, 16); this.cmdDiable.Name = "cmdDiable";
this.cmdDiable.Size = new System.Drawing.Size(96, 23); this.cmdDiable.TabIndex = 0;
this.cmdDiable.Text = "Disable Speech";
this.cmdDiable.Click += new
System.EventHandler(this.cmdDiable_Click); //
// txtHyp //
this.txtHyp.Location = new System.Drawing.Point(106, 106); this.txtHyp.Name = "txtHyp";
this.txtHyp.Size = new System.Drawing.Size(168, 20); this.txtHyp.TabIndex = 6;
// // label1 //
this.label1.Location = new System.Drawing.Point(18, 106); this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(72, 16); this.label1.TabIndex = 4;
this.label1.Text = "Hypothesis";
// // label2 //
this.label2.Location = new System.Drawing.Point(18, 146); this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(72, 16); this.label2.TabIndex = 3;
this.label2.Text = "Recognition"; //
// txtReco //
this.txtReco.Location = new System.Drawing.Point(106, 146); this.txtReco.Name = "txtReco";
this.txtReco.Size = new System.Drawing.Size(168, 20); this.txtReco.TabIndex = 5; this.txtReco.TextChanged += new System.EventHandler(this.txtReco_TextChanged); // // label3 //
this.label3.Location = new System.Drawing.Point(174, 202); this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(74, 18); this.label3.TabIndex = 7;
this.label3.TextAlign = System.Drawing.ContentAlignment.TopCenter; //
// label4 //
this.label4.Location = new System.Drawing.Point(24, 72); this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(240, 23); this.label4.TabIndex = 8;
// // Form1 //
this.AutoScaleBaseSize = new System.Drawing.Size(5, 13); this.ClientSize = new System.Drawing.Size(292, 273); this.Controls.Add(this.label4); this.Controls.Add(this.label3); this.Controls.Add(this.txtHyp); this.Controls.Add(this.label1); this.Controls.Add(this.label2); lxxxvi
this.Controls.Add(this.txtReco); this.Controls.Add(this.cmdEnable); this.Controls.Add(this.cmdDiable); this.Menu = this.mainMenu1; this.Name = "Form1";
this.Text = "Speech Test"; this.ResumeLayout(false); this.PerformLayout();
}
#endregion /// <summary>
/// The main entry point for the application. /// </summary>
[STAThread] static void Main()
{
Application.Run(new Form1());
}
private void cmdEnable_Click(object sender, System.EventArgs e)
{
label4.Text = "Initializing Speech Engine....";
// Get an insance of RecoContext. I am using the shared RecoContext.
objRecoContext = new SpeechLib.SpSharedRecoContext(); // Assign a eventhandler for the Hypothesis Event.
objRecoContext.Hypothesis += new _ISpeechRecoContextEvents_HypothesisEventHandler(Hypo_Event);
// Assign a eventhandler for the Recognition Event. objRecoContext.Recognition += new
_ISpeechRecoContextEvents_RecognitionEventHandler(Reco_Event); //Creating an instance of the grammer object.
grammar = objRecoContext.CreateGrammar(0); label3.Text = "Speak Out one of the follwoing.\r\n1. Lagu 2. Dokumen 3. yahoo 4. internet\r\n5. word";
//Activate the Menu Commands.
menuRule =
grammar.Rules.Add("MenuCommands",SpeechRuleAttributes.SRATopLevel|Spe echRuleAttributes.SRADynamic,1);
object PropValue = "";
menuRule.InitialState.AddWordTransition(null,"Lagu"," ",SpeechGrammarWordType.SGLexical,"Lagu", 1, ref PropValue, 1.0F );
menuRule.InitialState.AddWordTransition(null,"Dokumen"," ",SpeechGrammarWordType.SGLexical,"Dokumen", 2, ref PropValue, 1.0F ); menuRule.InitialState.AddWordTransition(null,"yahoo"," ",SpeechGrammarWordType.SGLexical,"yahoo",3, ref PropValue, 1.0F ); menuRule.InitialState.AddWordTransition(null,"internet"," ",SpeechGrammarWordType.SGLexical,"internet",4, ref PropValue, 1.0F ); menuRule.InitialState.AddWordTransition(null,"word"," ",SpeechGrammarWordType.SGLexical,"word",5, ref PropValue, 1.0F ); // menuRule.InitialState.AddWordTransition(null,"copy"," ",SpeechGrammarWordType.SGLexical,"copy",6, ref PropValue, 1.0F ); // menuRule.InitialState.AddWordTransition(null,"Paste"," ",SpeechGrammarWordType.SGLexical,"Paste",7, ref PropValue, 1.0F ); // menuRule.InitialState.AddWordTransition(null,"Delete"," ",SpeechGrammarWordType.SGLexical,"Delete",8, ref PropValue, 1.0F ); grammar.Rules.Commit();
grammar.CmdSetRuleState("MenuCommands", SpeechRuleState.SGDSActive);
label4.Text = "Speech Engine Ready for Input";
}
private void Reco_Event(int StreamNumber, object StreamPosition,SpeechRecognitionType RecognitionType,ISpeechRecoResult Result)
{
txtReco.Text = Result.PhraseInfo.GetText(0, -1, true);
}
private void Hypo_Event(int StreamNumber, object StreamPosition, ISpeechRecoResult Result)
{
txtHyp.Text = Result.PhraseInfo.GetText(0, -1, true);
}
private void cmdDiable_Click(object sender, System.EventArgs e)
{
label3.Text = ""; objRecoContext = null; label4.Text="";
}
//isi alamat perintah
private void txtReco_TextChanged(object sender, EventArgs e) {
if(txtReco.Text=="Lagu") {
System.Diagnostics.Process jalan = new System.Diagnostics.Process(); jalan.EnableRaisingEvents=false;
jalan.StartInfo.FileName = "C:\\Program Files\\Winamp\\winamp.exe"; jalan.Start();
}
else if(txtReco.Text=="Dokumen") {
System.Diagnostics.Process jalan = new System.Diagnostics.Process(); jalan.EnableRaisingEvents=false;
jalan.StartInfo.FileName="c:\\Users\\Haris Kisumal"; jalan.Start();
}
else if (txtReco.Text == "yahoo") {
System.Diagnostics.Process jalan = new System.Diagnostics.Process(); jalan.EnableRaisingEvents = false;
jalan.StartInfo.FileName ="C:\\Program Files\\Yahoo!\\Messenger"; jalan.Start();
}
else if (txtReco.Text == "internet") {
System.Diagnostics.Process jalan = new System.Diagnostics.Process(); jalan.EnableRaisingEvents = false;
jalan.StartInfo.FileName = "C:\\Program Files\\Mozilla Firefox\\firefox.exe";
jalan.Start(); }
else if (txtReco.Text =="word") {
System.Diagnostics.Process jalan = new System.Diagnostics.Process();
xc jalan.EnableRaisingEvents = false;
jalan.StartInfo.FileName = "C:\\Program Files\\Microsoft Office\\Office12\\WINWORD.exe"; jalan.Start(); } } } }