aboutsummaryrefslogtreecommitdiff
path: root/samples/SpeechRecognition/include/Decoder.hpp
diff options
context:
space:
mode:
authorGeorge Gekov <george.gekov@arm.com>2021-08-16 11:32:10 +0100
committerJim Flynn <jim.flynn@arm.com>2022-02-05 19:49:06 +0000
commit23c26277086c78704a17f0dae86da947816320c0 (patch)
tree88b02fd1fae3130256d059251788a7ef68d2831f /samples/SpeechRecognition/include/Decoder.hpp
parent922b912fd2d462bac0809bac5669310ad1506310 (diff)
downloadarmnn-23c26277086c78704a17f0dae86da947816320c0.tar.gz
MLECO-2079 Adding the C++ KWS example
Signed-off-by: Eanna O Cathain <eanna.ocathain@arm.com> Change-Id: I81899bbfaada32f478c2e2fc6441eabb94d8d0fc
Diffstat (limited to 'samples/SpeechRecognition/include/Decoder.hpp')
-rw-r--r--samples/SpeechRecognition/include/Decoder.hpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/samples/SpeechRecognition/include/Decoder.hpp b/samples/SpeechRecognition/include/Decoder.hpp
index 69d97ccf64..9dd484a5d1 100644
--- a/samples/SpeechRecognition/include/Decoder.hpp
+++ b/samples/SpeechRecognition/include/Decoder.hpp
@@ -46,8 +46,8 @@ namespace asr
rowVector.emplace_back(static_cast<int16_t>(contextToProcess[row * rowLength + j]));
}
- int max_index = std::distance(rowVector.begin(),std::max_element(rowVector.begin(), rowVector.end()));
- unfilteredText.emplace_back(this->m_labels.at(max_index)[0]);
+ int maxIndex = std::distance(rowVector.begin(), std::max_element(rowVector.begin(), rowVector.end()));
+ unfilteredText.emplace_back(this->m_labels.at(maxIndex)[0]);
}
std::string filteredText = FilterCharacters(unfilteredText);