summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormatthewsotoudeh <matthewsot@outlook.com>2017-02-05 13:08:49 -0800
committermatthewsotoudeh <matthewsot@outlook.com>2017-02-05 13:08:49 -0800
commitcd3d649848c9d629fef5ec20bfe0f8fa785eae82 (patch)
tree227029951e70a9f6aa38e7b84594ee7249c06a6b
parent5bdcc47817c2057f9c0beb4d45606e95b74561d6 (diff)
start/stop, since it predicts speech now tooHEADmaster
-rw-r--r--content/scripts/frontend.js2
-rw-r--r--content/scripts/speaker-rec.js4
-rw-r--r--index.html2
3 files changed, 4 insertions, 4 deletions
diff --git a/content/scripts/frontend.js b/content/scripts/frontend.js
index b7afec3..424aed2 100644
--- a/content/scripts/frontend.js
+++ b/content/scripts/frontend.js
@@ -58,7 +58,7 @@ $("#calibrate").click(function () {
});
$("#predict-speaker").click(function () {
- if ($("#predict-speaker").text().trim() == "Start Speaker Recognition Demo") {
+ if ($("#predict-speaker").text().trim() == "Start") {
window.sendServerMessage({ forward: true, type: "command", command: "start-speaker-rec" });
} else {
window.sendServerMessage({ forward: true, type: "command", command: "stop-speaker-rec" });
diff --git a/content/scripts/speaker-rec.js b/content/scripts/speaker-rec.js
index 68e18e1..afa82f2 100644
--- a/content/scripts/speaker-rec.js
+++ b/content/scripts/speaker-rec.js
@@ -2,7 +2,7 @@ function startSpeakerRec() {
window.loudnesses = window.attendees.map(function () { return 0; } );
window.featureBuffer = [];
window.pushToFeatureBuffer = true;
- $("#predict-speaker").text("Stop Speaker Recognition Demo");
+ $("#predict-speaker").text("Stop");
window.speakerRecInterval = setInterval(function () {
var curr_loudness = window.featureBuffer.reduce(function (acc, currVal, i, arr) { return acc + (currVal / arr.length) }, 0);
window.featureBuffer = [];
@@ -60,6 +60,6 @@ function updateSpeakerRec(data) {
function stopSpeakerRec() {
window.pushToFeatureBuffer = false;
window.featureBuffer = [];
- $("#predict-speaker").text("Start Speaker Recognition Demo");
+ $("#predict-speaker").text("Start");
clearInterval(window.speakerRecInterval);
}
diff --git a/index.html b/index.html
index 9b2be3b..c0cbf6f 100644
--- a/index.html
+++ b/index.html
@@ -42,7 +42,7 @@
<h1>Scribe</h1>
- <button id="predict-speaker">Start Speaker Recognition Demo</button>
+ <button id="predict-speaker">Start</button>
<ol id="predictions">
</ol>
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback