Browse Source

fixed correct order

master
Niko 4 years ago
parent
commit
11c87ece10
1 changed files with 5 additions and 7 deletions
  1. 5
    7
      client/ws-client.js

+ 5
- 7
client/ws-client.js View File

const QUESTION_ONE_ANSWERS = { 'teller': 1, 'hund': 1, 'lampe': 1, 'brief': 1, 'apfel': 1, 'apfelwiese': 2, 'apfelbaum': 2, 'und': 1, 'hose': 1, 'tisch': 1, 'wiese': 1, 'glas': 1, 'baum': 1 }; const QUESTION_ONE_ANSWERS = { 'teller': 1, 'hund': 1, 'lampe': 1, 'brief': 1, 'apfel': 1, 'apfelwiese': 2, 'apfelbaum': 2, 'und': 1, 'hose': 1, 'tisch': 1, 'wiese': 1, 'glas': 1, 'baum': 1 };
const QUESTION_ONE_QUESTIONS = ['teller', 'hund', 'lampe', 'brief', 'apfel', 'hose', 'tisch', 'wiese', 'glas', 'baum']; const QUESTION_ONE_QUESTIONS = ['teller', 'hund', 'lampe', 'brief', 'apfel', 'hose', 'tisch', 'wiese', 'glas', 'baum'];
const QUESTION_TWO_ANSWERS = {}; const QUESTION_TWO_ANSWERS = {};
var QUESTION_TWO_QUESTIONS = [''];
var QUESTION_TWO_QUESTIONS;
const QUESTION_THREE_QUESTIONS_PT1 = ['7, 2', '4, 7, 9', '5, 4, 9, 6', '2, 7, 5, 3, 6', '8, 1, 3, 5, 4, 2']; const QUESTION_THREE_QUESTIONS_PT1 = ['7, 2', '4, 7, 9', '5, 4, 9, 6', '2, 7, 5, 3, 6', '8, 1, 3, 5, 4, 2'];
const QUESTION_THREE_QUESTIONS_PT2 = ['8, 6', '3, 1, 5', '1, 9, 7, 4', '1, 3, 5, 4, 8', '4, 1, 2, 7, 9, 5']; const QUESTION_THREE_QUESTIONS_PT2 = ['8, 6', '3, 1, 5', '1, 9, 7, 4', '1, 3, 5, 4, 8', '4, 1, 2, 7, 9, 5'];
const QUESTION_THREE_ANSWERS_PT1 = ['27', '974', '6945', '63572', '245318']; const QUESTION_THREE_ANSWERS_PT1 = ['27', '974', '6945', '63572', '245318'];
break; break;
case WELCOME_INTENT: case WELCOME_INTENT:
state = 'detect'; state = 'detect';
// speak(result.fulfillmentText)
speak('go');
speak(result.fulfillmentText);
break; break;
case WELCOME_FOLLOWUP_YES: case WELCOME_FOLLOWUP_YES:
startQuestion(2);
startQuestion(1);
break; break;
case WELCOME_FOLLOWUP_NO: case WELCOME_FOLLOWUP_NO:
skipRecording = true; skipRecording = true;
function () { function () {
recognition.stop(); recognition.stop();
handleAnswer(answerQuery); handleAnswer(answerQuery);
}, 6000);
}, 60000);
recognizeSpeech(); recognizeSpeech();
}; };
} }


// #region global functions // #region global functions
function startDemenzScreening () { function startDemenzScreening () {
// ws.send('starte demenz test');
startQuestion(3);
ws.send('starte demenz test');
testBtn.disabled = true; testBtn.disabled = true;
testBtn.textContent = 'Test in progress'; testBtn.textContent = 'Test in progress';
infoPara.textContent = 'wait...'; infoPara.textContent = 'wait...';

Loading…
Cancel
Save