質問編集履歴
4
タグの追加
title
CHANGED
File without changes
|
body
CHANGED
File without changes
|
3
誤字
title
CHANGED
File without changes
|
body
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
###前提・実現したいこと
|
2
|
-
現在、音声認識を利用したデ
|
2
|
+
現在、音声認識を利用したデスクトップアプリケーションを作成しています。
|
3
|
-
作成している内容については声でiPhoneを操作できる「Siri」のようにデ
|
3
|
+
作成している内容については声でiPhoneを操作できる「Siri」のようにデスクトップ上でも声を使い、アプリを立ち上げる(終了させる)などの操作が出来るというものです。
|
4
4
|
基礎となるプログラムは、あらかた完成したのですがこのアプリを操作するためのUIの作成に苦戦しています。
|
5
5
|
|
6
6
|
完成させたい操作手順は以下の通りです。
|
2
文法の補修
title
CHANGED
File without changes
|
body
CHANGED
@@ -9,7 +9,7 @@
|
|
9
9
|
3.OKボタンを押すとアプリケーションのパスと入力された言葉を辞書ファイルに登録する。
|
10
10
|
4.マイクに向かって登録した言葉を発すると指定のアプリケーションを起動する。
|
11
11
|
|
12
|
-
1項目のD&Dして指定のアプリケーションのパスを取得することは、できましたがその取得したパスと起動するときに発する言葉を「アプリの追加」
|
12
|
+
1項目のD&Dして指定のアプリケーションのパスを取得することは、できましたがその取得したパスと起動するときに発する言葉を「Form1.cs」の「アプリの追加」項目への追加。「grammar.xml」のファイルには、起動するときに発する言葉のみを追加したいのですがその追加方法がわかりません。
|
13
13
|
目指したい完成形としては、取得したパスと起動ワードをテキストボックスに入力し、「登録」ボタンを押すと追加される。追加されたパスとワードが下のリストに追加され、そのリストからパスや登録ワードの変更が出来るというものです。
|
14
14
|
このやり方をお教えてほしいです。よろしくお願いします。
|
15
15
|
|
1
書式の追加、文章の改良
title
CHANGED
File without changes
|
body
CHANGED
@@ -9,11 +9,17 @@
|
|
9
9
|
3.OKボタンを押すとアプリケーションのパスと入力された言葉を辞書ファイルに登録する。
|
10
10
|
4.マイクに向かって登録した言葉を発すると指定のアプリケーションを起動する。
|
11
11
|
|
12
|
-
1項目のD&Dして指定のアプリケーションのパスを取得することは、できましたがその取得したパスと起動するときに発する言葉を「アプリの追加」の項目とに追加したいのですがその追加方法がわかりません。
|
12
|
+
1項目のD&Dして指定のアプリケーションのパスを取得することは、できましたがその取得したパスと起動するときに発する言葉を「アプリの追加」の項目と「grammar.xml」の辞書ファイルに追加したいのですがその追加方法がわかりません。
|
13
|
+
目指したい完成形としては、取得したパスと起動ワードをテキストボックスに入力し、「登録」ボタンを押すと追加される。追加されたパスとワードが下のリストに追加され、そのリストからパスや登録ワードの変更が出来るというものです。
|
13
|
-
|
14
|
+
このやり方をお教えてほしいです。よろしくお願いします。
|
14
15
|
|
16
|
+
下の画像は現在作成途中のUIになります。
|
17
|
+
また、何か追加した方が良いと思う機能がありましたら意見としてコメントいただけると幸いです。
|
15
18
|
|
19
|
+

|
16
20
|
|
21
|
+
|
22
|
+
|
17
23
|
###Form1.cs
|
18
24
|
|
19
25
|
```
|
@@ -126,11 +132,16 @@
|
|
126
132
|
|
127
133
|
|
128
134
|
|
135
|
+
|
129
136
|
//ユーザーインターフェース
|
130
137
|
|
131
138
|
private void InitializeComponent()
|
132
139
|
{
|
133
140
|
this.textBox1 = new System.Windows.Forms.TextBox();
|
141
|
+
this.textBox2 = new System.Windows.Forms.TextBox();
|
142
|
+
this.button1 = new System.Windows.Forms.Button();
|
143
|
+
this.button2 = new System.Windows.Forms.Button();
|
144
|
+
this.listBox1 = new System.Windows.Forms.ListBox();
|
134
145
|
this.SuspendLayout();
|
135
146
|
//
|
136
147
|
// textBox1
|
@@ -139,15 +150,55 @@
|
|
139
150
|
this.textBox1.Location = new System.Drawing.Point(12, 12);
|
140
151
|
this.textBox1.Multiline = true;
|
141
152
|
this.textBox1.Name = "textBox1";
|
142
|
-
this.textBox1.Size = new System.Drawing.Size(
|
153
|
+
this.textBox1.Size = new System.Drawing.Size(456, 19);
|
143
154
|
this.textBox1.TabIndex = 0;
|
144
155
|
this.textBox1.Text = "登録したいアプリをD&Dしてください";
|
145
156
|
this.textBox1.DragDrop += new System.Windows.Forms.DragEventHandler(this.TextBox_DragDrop);
|
146
157
|
this.textBox1.DragEnter += new System.Windows.Forms.DragEventHandler(this.TextBox_DragEnter);
|
147
158
|
//
|
159
|
+
// textBox2
|
160
|
+
//
|
161
|
+
this.textBox2.Location = new System.Drawing.Point(12, 37);
|
162
|
+
this.textBox2.Multiline = true;
|
163
|
+
this.textBox2.Name = "textBox2";
|
164
|
+
this.textBox2.Size = new System.Drawing.Size(456, 19);
|
165
|
+
this.textBox2.TabIndex = 1;
|
166
|
+
this.textBox2.Text = "登録ワードを入力してください";
|
167
|
+
//
|
168
|
+
// button1
|
169
|
+
//
|
170
|
+
this.button1.Location = new System.Drawing.Point(393, 62);
|
171
|
+
this.button1.Name = "button1";
|
172
|
+
this.button1.Size = new System.Drawing.Size(75, 23);
|
173
|
+
this.button1.TabIndex = 2;
|
174
|
+
this.button1.Text = "クリア";
|
175
|
+
this.button1.UseVisualStyleBackColor = true;
|
176
|
+
//
|
177
|
+
// button2
|
178
|
+
//
|
179
|
+
this.button2.Location = new System.Drawing.Point(312, 62);
|
180
|
+
this.button2.Name = "button2";
|
181
|
+
this.button2.Size = new System.Drawing.Size(75, 23);
|
182
|
+
this.button2.TabIndex = 3;
|
183
|
+
this.button2.Text = "登録";
|
184
|
+
this.button2.UseVisualStyleBackColor = true;
|
185
|
+
//
|
186
|
+
// listBox1
|
187
|
+
//
|
188
|
+
this.listBox1.FormattingEnabled = true;
|
189
|
+
this.listBox1.ItemHeight = 12;
|
190
|
+
this.listBox1.Location = new System.Drawing.Point(12, 95);
|
191
|
+
this.listBox1.Name = "listBox1";
|
192
|
+
this.listBox1.Size = new System.Drawing.Size(456, 88);
|
193
|
+
this.listBox1.TabIndex = 4;
|
194
|
+
//
|
148
195
|
// Form1
|
149
196
|
//
|
150
|
-
this.ClientSize = new System.Drawing.Size(
|
197
|
+
this.ClientSize = new System.Drawing.Size(618, 195);
|
198
|
+
this.Controls.Add(this.listBox1);
|
199
|
+
this.Controls.Add(this.button2);
|
200
|
+
this.Controls.Add(this.button1);
|
201
|
+
this.Controls.Add(this.textBox2);
|
151
202
|
this.Controls.Add(this.textBox1);
|
152
203
|
this.Name = "Form1";
|
153
204
|
this.Load += new System.EventHandler(this.Form1_Load_1);
|
@@ -200,7 +251,6 @@
|
|
200
251
|
}
|
201
252
|
}
|
202
253
|
}
|
203
|
-
|
204
254
|
```
|
205
255
|
|
206
256
|
###grammar.xml
|
@@ -214,6 +264,8 @@
|
|
214
264
|
<item>今何時</item>
|
215
265
|
<item>ワード</item>
|
216
266
|
<item>エクセル</item>
|
267
|
+
<item>パワポ</item>
|
268
|
+
<item>パワーポイント</item>
|
217
269
|
|
218
270
|
|
219
271
|
</one-of>
|