Skip to content

Commit 083c926

Browse files
GitHub30jenperson
andauthored
Fix example code in readme (#248)
The words variable is array. Co-authored-by: Jen Person <[email protected]>
1 parent c855f2e commit 083c926

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

speech-commands/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ await transferRecognizer.listen(result => {
254254
const words = transferRecognizer.wordLabels();
255255
// `result.scores` contains the scores for the new words, not the original
256256
// words.
257-
for (let i = 0; i < words; ++i) {
257+
for (let i = 0; i < words.length; ++i) {
258258
console.log(`score for word '${words[i]}' = ${result.scores[i]}`);
259259
}
260260
}, {probabilityThreshold: 0.75});

0 commit comments

Comments
 (0)