Skip to content

Commit 7a1240e

Browse files
committed
Artyom 1.0.4
New event that triggers when not any command was matched.
1 parent 7f2b2d9 commit 7a1240e

File tree

11 files changed

+34
-20
lines changed

11 files changed

+34
-20
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
node_modules
2+
.vscode

.npmignore

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
development
2-
nbproject
32
node_modules
43
public
5-
.gitignore
4+
.gitignore

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@ The most known features of artyom are:
4747
- onStart and onEnd callbacks **will be always executed independently of the text length**.
4848
- Works both in desktop browser and mobile device.
4949

50+
Read [the changelog to be informed about changes and additions in Artyom.js](http://docs.ourcodeworld.com/projects/artyom-js/documentation/getting-started/official-changelog)
51+
5052
# Installation
5153

5254
#### NPM

build-vanilla/artyom.js

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* Artyom.js requires webkitSpeechRecognition and speechSynthesis APIs
33
*
44
* @license MIT
5-
* @version 1.0.3
5+
* @version 1.0.4
66
* @copyright 2017 Our Code World All Rights Reserved.
77
* @author Carlos Delgado - www.ourcodeworld.com
88
* @param {Object} window
@@ -93,7 +93,8 @@
9393
TEXT_RECOGNIZED: "TEXT_RECOGNIZED",
9494
COMMAND_RECOGNITION_START : "COMMAND_RECOGNITION_START",
9595
COMMAND_RECOGNITION_END: "COMMAND_RECOGNITION_END",
96-
COMMAND_MATCHED: "COMMAND_MATCHED"
96+
COMMAND_MATCHED: "COMMAND_MATCHED",
97+
NOT_COMMAND_MATCHED: "NOT_COMMAND_MATCHED"
9798
};
9899

99100
/**
@@ -1243,6 +1244,9 @@
12431244
}
12441245
}
12451246

1247+
artyom.debug("Event reached : " + artyom_global_events.NOT_COMMAND_MATCHED);
1248+
artyom_triggerEvent(artyom_global_events.NOT_COMMAND_MATCHED);
1249+
12461250
return false;
12471251
};
12481252

@@ -1610,7 +1614,7 @@
16101614
* @returns {String}
16111615
*/
16121616
artyom.getVersion = function () {
1613-
return "1.0.3";
1617+
return "1.0.4";
16141618
};
16151619

16161620
/**

build-vanilla/artyom.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

development/artyom-source/artyom.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,8 @@
8686
TEXT_RECOGNIZED: "TEXT_RECOGNIZED",
8787
COMMAND_RECOGNITION_START : "COMMAND_RECOGNITION_START",
8888
COMMAND_RECOGNITION_END: "COMMAND_RECOGNITION_END",
89-
COMMAND_MATCHED: "COMMAND_MATCHED"
89+
COMMAND_MATCHED: "COMMAND_MATCHED",
90+
NOT_COMMAND_MATCHED: "NOT_COMMAND_MATCHED"
9091
};
9192

9293
/**
@@ -1236,6 +1237,9 @@
12361237
}
12371238
}
12381239

1240+
artyom.debug("Event reached : " + artyom_global_events.NOT_COMMAND_MATCHED);
1241+
artyom_triggerEvent(artyom_global_events.NOT_COMMAND_MATCHED);
1242+
12391243
return false;
12401244
};
12411245

@@ -1603,7 +1607,7 @@
16031607
* @returns {String}
16041608
*/
16051609
artyom.getVersion = function () {
1606-
return "1.0.2";
1610+
return "1.0.4";
16071611
};
16081612

16091613
/**

development/artyom-source/sandbox-scripts.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@
6161
SANDBOX.loadCommands();
6262

6363
if(status){
64-
/*
6564
artyom.initialize({
6665
lang:"en-GB",
6766
continuous:true,
@@ -72,7 +71,7 @@
7271
console.log("Artyom succesfully initialized");
7372
}).catch((err) => {
7473
console.error("Artyom couldn't be initialized: ", err);
75-
});*/
74+
});
7675
}
7776

7877
$("#btn-speak").click(() => {

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "artyom.js",
3-
"version": "1.0.3",
3+
"version": "1.0.4",
44
"description": "Artyom is a Robust Wrapper of the Google Chrome SpeechSynthesis and SpeechRecognition that allows you to create a virtual assistent",
55
"main": "ts/artyom.js",
66
"typings": "ts/index.d.ts",

public/artyom-source.zip

44 Bytes
Binary file not shown.

ts/artyom.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,8 @@ var ArtyomGlobalEvents = {
171171
TEXT_RECOGNIZED: "TEXT_RECOGNIZED",
172172
COMMAND_RECOGNITION_START: "COMMAND_RECOGNITION_START",
173173
COMMAND_RECOGNITION_END: "COMMAND_RECOGNITION_END",
174-
COMMAND_MATCHED: "COMMAND_MATCHED"
174+
COMMAND_MATCHED: "COMMAND_MATCHED",
175+
NOT_COMMAND_MATCHED: "NOT_COMMAND_MATCHED"
175176
};
176177
var ArtyomLanguages = {
177178
german: ["Google Deutsch", "de-DE", "de_DE"],
@@ -362,7 +363,6 @@ var ArtyomJsImpl = (function () {
362363
else {
363364
msg.voice = availableVoice;
364365
}
365-
console.log("Usando voz ", availableVoice);
366366
}
367367
else {
368368
console.warn("Using default voice because no voice was selected during the initialization probably because there were no voices available. Initialize artyom after the onload event of the window.");
@@ -697,6 +697,8 @@ var ArtyomJsImpl = (function () {
697697
}
698698
}
699699
}
700+
_this.debug("Event reached : " + ArtyomGlobalEvents.NOT_COMMAND_MATCHED);
701+
ArtyomHelpers.artyomTriggerEvent(ArtyomGlobalEvents.NOT_COMMAND_MATCHED);
700702
return {
701703
result: false,
702704
indice: null,
@@ -1129,7 +1131,7 @@ var ArtyomJsImpl = (function () {
11291131
return !!_this.artyomProperties.obeying;
11301132
};
11311133
this.getVersion = function () {
1132-
return "1.0.3";
1134+
return "1.0.4";
11331135
};
11341136
this.on = function (indexes, smart) {
11351137
return {

0 commit comments

Comments
 (0)