|
44 | 44 | </div> |
45 | 45 |
|
46 | 46 | <div class="form-row credentials"> |
47 | | - <label> </label> |
48 | | - <input type="checkbox" id="node-input-default-endpoint" style="display: inline-block; width: auto; vertical-align: top;"> |
49 | | - <label for="node-input-default-endpoint" style="width: 70%;"> Use Default Service Endpoint</label> |
50 | | - </div> |
51 | | - <div class="form-row"> |
52 | 47 | <label for="node-input-service-endpoint"><i class="fa fa-tag"></i> Service Endpoint</label> |
53 | 48 | <input type="text" id="node-input-service-endpoint" placeholder="https://stream.watsonplatform.net/speech-to-text/api"> |
54 | 49 | </div> |
|
59 | 54 | <option value="createCustomisation">Create a custom language model</option> |
60 | 55 | <option value="listCustomisations">List Customizations</option> |
61 | 56 | <option value="getCustomisation">Get Customization</option> |
| 57 | + <option value="resetCustomisation">Reset Customization</option> |
| 58 | + <option value="upgradeCustomisation">Upgrade Customization</option> |
62 | 59 | <option value="deleteCustomisation">Delete Customization</option> |
| 60 | + <option disabled>______________</option> |
63 | 61 | <option value="addCorpus">Add Corpus</option> |
64 | | - <option value="getCorpora">Get Corpora</option> |
65 | | - <option value="train">Train</option> |
66 | | - <option value="listCustomWords">List Custom Words</option> |
67 | | - <option value="addWords">Add Words</option> |
| 62 | + <option value="getCorpus">Get Corpus</option> |
| 63 | + <option value="getCorpora">List Corpora</option> |
68 | 64 | <option value="deleteCorpus">Delete Corpus</option> |
| 65 | + <option disabled>______________</option> |
| 66 | + <option value="addWords">Add Words</option> |
| 67 | + <option value="listCustomWords">List Custom Words</option> |
| 68 | + <option value="deleteCustomWord">Delete Custom Word</option> |
| 69 | + <option disabled>______________</option> |
| 70 | + <option value="train">Train Customization</option> |
| 71 | + |
69 | 72 | </select> |
70 | 73 | </div> |
71 | 74 |
|
|
98 | 101 | <input type="text" id="node-input-stt-corpus-name" placeholder=""> |
99 | 102 | </div> |
100 | 103 |
|
| 104 | + <div class="form-row"> |
| 105 | + <label for="node-input-stt-word-name"><i class="fa fa-book"></i> Word Name</label> |
| 106 | + <input type="text" id="node-input-stt-word-name" placeholder=""> |
| 107 | + </div> |
| 108 | + |
101 | 109 | <div class="form-row"> |
102 | 110 | <label for="node-input-stt-allow-overwrite"><i class="fa fa-book"></i> Allow Overwrite</label> |
103 | 111 | <input type="checkbox" id="node-input-stt-allow-overwrite" placeholder=""> |
|
128 | 136 | <code>msg.customization</code> |
129 | 137 | </p> |
130 | 138 | </li> |
| 139 | + <li>Reset Customization |
| 140 | + <p>In this mode, the specified customization is reset, |
| 141 | + removing all corpora, grammars, and words from the model. |
| 142 | + </p> |
| 143 | + </li> |
| 144 | + <li>Upgrade Customization |
| 145 | + <p>In this mode, an upgrade of the custom language model |
| 146 | + to the latest version of its base language model is |
| 147 | + initialised. |
| 148 | + </p> |
| 149 | + </li> |
131 | 150 | <li>Delete Customization |
132 | 151 | <p>In this mode, the specified customization is deleted. |
133 | 152 | </p> |
|
146 | 165 | <code>msg.corpora</code> |
147 | 166 | </p> |
148 | 167 | </li> |
| 168 | + <li>Get Corpus |
| 169 | + <p>In this mode, details for the selected corporus |
| 170 | + is returned on |
| 171 | + <code>msg.corpus</code> |
| 172 | + </p> |
| 173 | + </li> |
149 | 174 | <li>Train |
150 | 175 | <p>In this mode, the custom model is prepared for use |
151 | 176 | by the speech to text service. |
|
207 | 232 | $('input#node-input-stt-custom-model-description').parent().hide(); |
208 | 233 | $('input#node-input-stt-custom-id').parent().hide(); |
209 | 234 | $('input#node-input-stt-corpus-name').parent().hide(); |
| 235 | + $('input#node-input-stt-word-name').parent().hide(); |
210 | 236 | $('input#node-input-stt-allow-overwrite').parent().hide(); |
211 | 237 | } |
212 | 238 |
|
|
237 | 263 | break; |
238 | 264 | case 'getCustomisation': |
239 | 265 | case 'deleteCustomisation': |
| 266 | + case 'upgradeCustomisation': |
| 267 | + case 'resetCustomisation': |
240 | 268 | case 'getCorpora': |
241 | 269 | case 'train': |
242 | 270 | case 'listCustomWords': |
|
249 | 277 | + ', #node-input-stt-allow-overwrite'); |
250 | 278 | break; |
251 | 279 | case 'deleteCorpus': |
252 | | - fields.push('#node-input-stt-custom-id' |
253 | | - + ', #node-input-stt-corpus-name'); |
254 | | - break; |
| 280 | + case 'getCorpus': |
| 281 | + fields.push('#node-input-stt-custom-id' |
| 282 | + + ', #node-input-stt-corpus-name'); |
| 283 | + break; |
| 284 | + case 'deleteCustomWord': |
| 285 | + fields.push('#node-input-stt-custom-id' |
| 286 | + + ', #node-input-stt-word-name'); |
| 287 | + break; |
255 | 288 | } |
256 | 289 | sttv1qbb.showSelectedFields(fields); |
257 | 290 | } |
|
304 | 337 | $('#node-input-stt-base-model').change(function (val) { |
305 | 338 | sttv1qbb.model_selected = $('#node-input-stt-base-model').val(); |
306 | 339 | }); |
307 | | - |
308 | | - $('#node-input-default-endpoint').change(function () { |
309 | | - var checked = $('#node-input-default-endpoint').prop('checked') |
310 | | - if (checked) { |
311 | | - $('#node-input-service-endpoint').parent().hide(); |
312 | | - } else { |
313 | | - $('#node-input-service-endpoint').parent().show(); |
314 | | - } |
315 | | - }); |
316 | 340 | } |
317 | 341 |
|
318 | 342 | // Called to complete the models table |
|
367 | 391 | var e = $('#node-input-service-endpoint').val(); |
368 | 392 | var creds = {un: u, pwd: p, key: k}; |
369 | 393 |
|
370 | | - if (! $('#node-input-default-endpoint').prop('checked')) { |
371 | | - creds.e = e; |
372 | | - } |
| 394 | + creds.e = e; |
| 395 | + |
373 | 396 | $.getJSON('watson-speech-to-text-v1-query-builder/models/', creds) |
374 | 397 | .done(function (data) { |
375 | 398 | if (data.error) { |
|
430 | 453 | 'stt-custom-model-description' : {value: ''}, |
431 | 454 | 'stt-custom-id' : {value: ''}, |
432 | 455 | 'stt-corpus-name' : {value: ''}, |
| 456 | + 'stt-word-name' : {value: ''}, |
433 | 457 | 'stt-allow-overwrite' : {value: false}, |
434 | | - 'default-endpoint' :{value: true}, |
435 | | - 'service-endpoint' :{value: 'https://stream.watsonplatform.net/speech-to-text/api'} |
| 458 | + 'service-endpoint' :{value: ''} |
436 | 459 | }, |
437 | 460 | credentials: { |
438 | 461 | username: {type:'text'} //, |
|
0 commit comments