Skip to content

Commit

Permalink
Implemented word skipping for incorrectly recognized words.
Browse files Browse the repository at this point in the history
  • Loading branch information
octavpo committed Oct 5, 2018
1 parent 00bb621 commit 9d488f8
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 87 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -517,7 +517,7 @@ public void run() {
//
ASRTimer = System.currentTimeMillis();
Hypothesis hypothesis = decoder.hyp();
Log.d("ASR", "Time in Decoder: " + (System.currentTimeMillis() - ASRTimer));
// Log.d("ASR", "Time in Decoder: " + (System.currentTimeMillis() - ASRTimer));

// If there is a valid hypothesis string from the decoder continue
// Once the decoder returns a hypothesis it will not go back to
Expand Down Expand Up @@ -625,7 +625,8 @@ private void publishStableHypothesis(Hypothesis hypothesis) {

for (int i1 = 0; i1 < maxScan; i1++) {
// If the word has changed - update its last changed time.
if (!asrWords[i1].equals(prevAsrWords[i1])) {
if (!asrWords[i1].equals(prevAsrWords[i1]) // && !("START_" + asrWords[i1]).equals(prevAsrWords[i1])
) {
wordLastChanged.set(i1, currTime);

Log.d("ASR", "Word Changed: " + asrWords[i1] + " from: " + prevAsrWords[i1]);
Expand Down
Loading

0 comments on commit 9d488f8

Please sign in to comment.