alexander | 3c79893 | 2021-03-26 21:42:19 +0000 | [diff] [blame] | 1 | /* |
Kshitij Sisodia | 2ea4623 | 2022-12-19 16:37:33 +0000 | [diff] [blame] | 2 | * SPDX-FileCopyrightText: Copyright 2021-2022 Arm Limited and/or its affiliates |
| 3 | * <open-source-office@arm.com> SPDX-License-Identifier: Apache-2.0 |
alexander | 3c79893 | 2021-03-26 21:42:19 +0000 | [diff] [blame] | 4 | * |
| 5 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 6 | * you may not use this file except in compliance with the License. |
| 7 | * You may obtain a copy of the License at |
| 8 | * |
| 9 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | * |
| 11 | * Unless required by applicable law or agreed to in writing, software |
| 12 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 14 | * See the License for the specific language governing permissions and |
| 15 | * limitations under the License. |
| 16 | */ |
| 17 | #include "UseCaseHandler.hpp" |
| 18 | |
alexander | 3c79893 | 2021-03-26 21:42:19 +0000 | [diff] [blame] | 19 | #include "AsrClassifier.hpp" |
Kshitij Sisodia | 2ea4623 | 2022-12-19 16:37:33 +0000 | [diff] [blame] | 20 | #include "AsrResult.hpp" |
alexander | 3c79893 | 2021-03-26 21:42:19 +0000 | [diff] [blame] | 21 | #include "AudioUtils.hpp" |
Richard Burton | ed35a6f | 2022-02-14 11:55:35 +0000 | [diff] [blame] | 22 | #include "ImageUtils.hpp" |
Kshitij Sisodia | 2ea4623 | 2022-12-19 16:37:33 +0000 | [diff] [blame] | 23 | #include "InputFiles.hpp" |
alexander | 3c79893 | 2021-03-26 21:42:19 +0000 | [diff] [blame] | 24 | #include "OutputDecode.hpp" |
Kshitij Sisodia | 2ea4623 | 2022-12-19 16:37:33 +0000 | [diff] [blame] | 25 | #include "UseCaseCommonUtils.hpp" |
| 26 | #include "Wav2LetterModel.hpp" |
| 27 | #include "Wav2LetterPostprocess.hpp" |
| 28 | #include "Wav2LetterPreprocess.hpp" |
| 29 | #include "hal.h" |
alexander | 31ae9f0 | 2022-02-10 16:15:54 +0000 | [diff] [blame] | 30 | #include "log_macros.h" |
alexander | 3c79893 | 2021-03-26 21:42:19 +0000 | [diff] [blame] | 31 | |
| 32 | namespace arm { |
| 33 | namespace app { |
| 34 | |
| 35 | /** |
Richard Burton | b40ecf8 | 2022-04-22 16:14:57 +0100 | [diff] [blame] | 36 | * @brief Presents ASR inference results. |
| 37 | * @param[in] results Vector of ASR classification results to be displayed. |
| 38 | * @return true if successful, false otherwise. |
alexander | 3c79893 | 2021-03-26 21:42:19 +0000 | [diff] [blame] | 39 | **/ |
Richard Burton | c291144 | 2022-04-22 09:08:21 +0100 | [diff] [blame] | 40 | static bool PresentInferenceResult(const std::vector<asr::AsrResult>& results); |
alexander | 3c79893 | 2021-03-26 21:42:19 +0000 | [diff] [blame] | 41 | |
Richard Burton | c291144 | 2022-04-22 09:08:21 +0100 | [diff] [blame] | 42 | /* ASR inference handler. */ |
alexander | 3c79893 | 2021-03-26 21:42:19 +0000 | [diff] [blame] | 43 | bool ClassifyAudioHandler(ApplicationContext& ctx, uint32_t clipIndex, bool runAll) |
| 44 | { |
Kshitij Sisodia | 2ea4623 | 2022-12-19 16:37:33 +0000 | [diff] [blame] | 45 | auto& model = ctx.Get<Model&>("model"); |
| 46 | auto& profiler = ctx.Get<Profiler&>("profiler"); |
| 47 | auto mfccFrameLen = ctx.Get<uint32_t>("frameLength"); |
Richard Burton | c291144 | 2022-04-22 09:08:21 +0100 | [diff] [blame] | 48 | auto mfccFrameStride = ctx.Get<uint32_t>("frameStride"); |
Kshitij Sisodia | 2ea4623 | 2022-12-19 16:37:33 +0000 | [diff] [blame] | 49 | auto scoreThreshold = ctx.Get<float>("scoreThreshold"); |
| 50 | auto inputCtxLen = ctx.Get<uint32_t>("ctxLen"); |
alexander | 3c79893 | 2021-03-26 21:42:19 +0000 | [diff] [blame] | 51 | /* If the request has a valid size, set the audio index. */ |
| 52 | if (clipIndex < NUMBER_OF_FILES) { |
Kshitij Sisodia | 2ea4623 | 2022-12-19 16:37:33 +0000 | [diff] [blame] | 53 | if (!SetAppCtxIfmIdx(ctx, clipIndex, "clipIndex")) { |
alexander | 3c79893 | 2021-03-26 21:42:19 +0000 | [diff] [blame] | 54 | return false; |
| 55 | } |
| 56 | } |
Kshitij Sisodia | 2ea4623 | 2022-12-19 16:37:33 +0000 | [diff] [blame] | 57 | auto initialClipIdx = ctx.Get<uint32_t>("clipIndex"); |
Richard Burton | c291144 | 2022-04-22 09:08:21 +0100 | [diff] [blame] | 58 | constexpr uint32_t dataPsnTxtInfStartX = 20; |
| 59 | constexpr uint32_t dataPsnTxtInfStartY = 40; |
alexander | 3c79893 | 2021-03-26 21:42:19 +0000 | [diff] [blame] | 60 | |
alexander | 3c79893 | 2021-03-26 21:42:19 +0000 | [diff] [blame] | 61 | if (!model.IsInited()) { |
| 62 | printf_err("Model is not initialised! Terminating processing.\n"); |
| 63 | return false; |
| 64 | } |
| 65 | |
Kshitij Sisodia | 2ea4623 | 2022-12-19 16:37:33 +0000 | [diff] [blame] | 66 | TfLiteTensor* inputTensor = model.GetInputTensor(0); |
Richard Burton | b40ecf8 | 2022-04-22 16:14:57 +0100 | [diff] [blame] | 67 | TfLiteTensor* outputTensor = model.GetOutputTensor(0); |
| 68 | |
Richard Burton | c291144 | 2022-04-22 09:08:21 +0100 | [diff] [blame] | 69 | /* Get input shape. Dimensions of the tensor should have been verified by |
alexander | 3c79893 | 2021-03-26 21:42:19 +0000 | [diff] [blame] | 70 | * the callee. */ |
Richard Burton | c291144 | 2022-04-22 09:08:21 +0100 | [diff] [blame] | 71 | TfLiteIntArray* inputShape = model.GetInputShape(0); |
alexander | 3c79893 | 2021-03-26 21:42:19 +0000 | [diff] [blame] | 72 | |
Richard Burton | c291144 | 2022-04-22 09:08:21 +0100 | [diff] [blame] | 73 | const uint32_t inputRowsSize = inputShape->data[Wav2LetterModel::ms_inputRowsIdx]; |
| 74 | const uint32_t inputInnerLen = inputRowsSize - (2 * inputCtxLen); |
alexander | 3c79893 | 2021-03-26 21:42:19 +0000 | [diff] [blame] | 75 | |
| 76 | /* Audio data stride corresponds to inputInnerLen feature vectors. */ |
Richard Burton | c291144 | 2022-04-22 09:08:21 +0100 | [diff] [blame] | 77 | const uint32_t audioDataWindowLen = (inputRowsSize - 1) * mfccFrameStride + (mfccFrameLen); |
| 78 | const uint32_t audioDataWindowStride = inputInnerLen * mfccFrameStride; |
alexander | 3c79893 | 2021-03-26 21:42:19 +0000 | [diff] [blame] | 79 | |
Richard Burton | c291144 | 2022-04-22 09:08:21 +0100 | [diff] [blame] | 80 | /* NOTE: This is only used for time stamp calculation. */ |
| 81 | const float secondsPerSample = (1.0 / audio::Wav2LetterMFCC::ms_defaultSamplingFreq); |
alexander | 3c79893 | 2021-03-26 21:42:19 +0000 | [diff] [blame] | 82 | |
Richard Burton | c291144 | 2022-04-22 09:08:21 +0100 | [diff] [blame] | 83 | /* Set up pre and post-processing objects. */ |
Kshitij Sisodia | 2ea4623 | 2022-12-19 16:37:33 +0000 | [diff] [blame] | 84 | AsrPreProcess preProcess = AsrPreProcess(inputTensor, |
| 85 | Wav2LetterModel::ms_numMfccFeatures, |
Richard Burton | b40ecf8 | 2022-04-22 16:14:57 +0100 | [diff] [blame] | 86 | inputShape->data[Wav2LetterModel::ms_inputRowsIdx], |
Kshitij Sisodia | 2ea4623 | 2022-12-19 16:37:33 +0000 | [diff] [blame] | 87 | mfccFrameLen, |
| 88 | mfccFrameStride); |
alexander | 3c79893 | 2021-03-26 21:42:19 +0000 | [diff] [blame] | 89 | |
Richard Burton | c291144 | 2022-04-22 09:08:21 +0100 | [diff] [blame] | 90 | std::vector<ClassificationResult> singleInfResult; |
Richard Burton | b40ecf8 | 2022-04-22 16:14:57 +0100 | [diff] [blame] | 91 | const uint32_t outputCtxLen = AsrPostProcess::GetOutputContextLen(model, inputCtxLen); |
Kshitij Sisodia | 2ea4623 | 2022-12-19 16:37:33 +0000 | [diff] [blame] | 92 | AsrPostProcess postProcess = AsrPostProcess(outputTensor, |
| 93 | ctx.Get<AsrClassifier&>("classifier"), |
| 94 | ctx.Get<std::vector<std::string>&>("labels"), |
| 95 | singleInfResult, |
| 96 | outputCtxLen, |
| 97 | Wav2LetterModel::ms_blankTokenIdx, |
| 98 | Wav2LetterModel::ms_outputRowsIdx); |
Richard Burton | c291144 | 2022-04-22 09:08:21 +0100 | [diff] [blame] | 99 | |
alexander | 3c79893 | 2021-03-26 21:42:19 +0000 | [diff] [blame] | 100 | /* Loop to process audio clips. */ |
| 101 | do { |
Kshitij Sisodia | 68fdd11 | 2022-04-06 13:03:20 +0100 | [diff] [blame] | 102 | hal_lcd_clear(COLOR_BLACK); |
Richard Burton | 9b8d67a | 2021-12-10 12:32:51 +0000 | [diff] [blame] | 103 | |
alexander | 3c79893 | 2021-03-26 21:42:19 +0000 | [diff] [blame] | 104 | /* Get current audio clip index. */ |
| 105 | auto currentIndex = ctx.Get<uint32_t>("clipIndex"); |
| 106 | |
| 107 | /* Get the current audio buffer and respective size. */ |
Kshitij Sisodia | 2ea4623 | 2022-12-19 16:37:33 +0000 | [diff] [blame] | 108 | const int16_t* audioArr = GetAudioArray(currentIndex); |
| 109 | const uint32_t audioArrSize = GetAudioArraySize(currentIndex); |
alexander | 3c79893 | 2021-03-26 21:42:19 +0000 | [diff] [blame] | 110 | |
| 111 | if (!audioArr) { |
Richard Burton | c291144 | 2022-04-22 09:08:21 +0100 | [diff] [blame] | 112 | printf_err("Invalid audio array pointer.\n"); |
alexander | 3c79893 | 2021-03-26 21:42:19 +0000 | [diff] [blame] | 113 | return false; |
| 114 | } |
| 115 | |
Richard Burton | c291144 | 2022-04-22 09:08:21 +0100 | [diff] [blame] | 116 | /* Audio clip needs enough samples to produce at least 1 MFCC feature. */ |
| 117 | if (audioArrSize < mfccFrameLen) { |
Kshitij Sisodia | f9c19ea | 2021-05-07 16:08:14 +0100 | [diff] [blame] | 118 | printf_err("Not enough audio samples, minimum needed is %" PRIu32 "\n", |
Richard Burton | c291144 | 2022-04-22 09:08:21 +0100 | [diff] [blame] | 119 | mfccFrameLen); |
alexander | 3c79893 | 2021-03-26 21:42:19 +0000 | [diff] [blame] | 120 | return false; |
| 121 | } |
| 122 | |
Richard Burton | c291144 | 2022-04-22 09:08:21 +0100 | [diff] [blame] | 123 | /* Creating a sliding window through the whole audio clip. */ |
alexander | 80eecfb | 2021-07-06 19:47:59 +0100 | [diff] [blame] | 124 | auto audioDataSlider = audio::FractionalSlidingWindow<const int16_t>( |
Kshitij Sisodia | 2ea4623 | 2022-12-19 16:37:33 +0000 | [diff] [blame] | 125 | audioArr, audioArrSize, audioDataWindowLen, audioDataWindowStride); |
alexander | 3c79893 | 2021-03-26 21:42:19 +0000 | [diff] [blame] | 126 | |
Richard Burton | c291144 | 2022-04-22 09:08:21 +0100 | [diff] [blame] | 127 | /* Declare a container for final results. */ |
| 128 | std::vector<asr::AsrResult> finalResults; |
alexander | 3c79893 | 2021-03-26 21:42:19 +0000 | [diff] [blame] | 129 | |
| 130 | /* Display message on the LCD - inference running. */ |
| 131 | std::string str_inf{"Running inference... "}; |
Kshitij Sisodia | 2ea4623 | 2022-12-19 16:37:33 +0000 | [diff] [blame] | 132 | hal_lcd_display_text( |
| 133 | str_inf.c_str(), str_inf.size(), dataPsnTxtInfStartX, dataPsnTxtInfStartY, 0); |
alexander | 3c79893 | 2021-03-26 21:42:19 +0000 | [diff] [blame] | 134 | |
Kshitij Sisodia | 2ea4623 | 2022-12-19 16:37:33 +0000 | [diff] [blame] | 135 | info("Running inference on audio clip %" PRIu32 " => %s\n", |
| 136 | currentIndex, |
| 137 | GetFilename(currentIndex)); |
alexander | 3c79893 | 2021-03-26 21:42:19 +0000 | [diff] [blame] | 138 | |
Richard Burton | c291144 | 2022-04-22 09:08:21 +0100 | [diff] [blame] | 139 | size_t inferenceWindowLen = audioDataWindowLen; |
alexander | 3c79893 | 2021-03-26 21:42:19 +0000 | [diff] [blame] | 140 | |
| 141 | /* Start sliding through audio clip. */ |
| 142 | while (audioDataSlider.HasNext()) { |
| 143 | |
Richard Burton | c291144 | 2022-04-22 09:08:21 +0100 | [diff] [blame] | 144 | /* If not enough audio, see how much can be sent for processing. */ |
alexander | 3c79893 | 2021-03-26 21:42:19 +0000 | [diff] [blame] | 145 | size_t nextStartIndex = audioDataSlider.NextWindowStartIndex(); |
Richard Burton | c291144 | 2022-04-22 09:08:21 +0100 | [diff] [blame] | 146 | if (nextStartIndex + audioDataWindowLen > audioArrSize) { |
alexander | 3c79893 | 2021-03-26 21:42:19 +0000 | [diff] [blame] | 147 | inferenceWindowLen = audioArrSize - nextStartIndex; |
| 148 | } |
| 149 | |
| 150 | const int16_t* inferenceWindow = audioDataSlider.Next(); |
| 151 | |
Kshitij Sisodia | 2ea4623 | 2022-12-19 16:37:33 +0000 | [diff] [blame] | 152 | info("Inference %zu/%zu\n", |
| 153 | audioDataSlider.Index() + 1, |
alexander | 3c79893 | 2021-03-26 21:42:19 +0000 | [diff] [blame] | 154 | static_cast<size_t>(ceilf(audioDataSlider.FractionalTotalStrides() + 1))); |
| 155 | |
Richard Burton | c291144 | 2022-04-22 09:08:21 +0100 | [diff] [blame] | 156 | /* Run the pre-processing, inference and post-processing. */ |
Richard Burton | b40ecf8 | 2022-04-22 16:14:57 +0100 | [diff] [blame] | 157 | if (!preProcess.DoPreProcess(inferenceWindow, inferenceWindowLen)) { |
| 158 | printf_err("Pre-processing failed."); |
Richard Burton | c291144 | 2022-04-22 09:08:21 +0100 | [diff] [blame] | 159 | return false; |
| 160 | } |
Richard Burton | c291144 | 2022-04-22 09:08:21 +0100 | [diff] [blame] | 161 | |
Richard Burton | b40ecf8 | 2022-04-22 16:14:57 +0100 | [diff] [blame] | 162 | if (!RunInference(model, profiler)) { |
| 163 | printf_err("Inference failed."); |
| 164 | return false; |
| 165 | } |
| 166 | |
| 167 | /* Post processing needs to know if we are on the last audio window. */ |
Richard Burton | c291144 | 2022-04-22 09:08:21 +0100 | [diff] [blame] | 168 | postProcess.m_lastIteration = !audioDataSlider.HasNext(); |
Richard Burton | b40ecf8 | 2022-04-22 16:14:57 +0100 | [diff] [blame] | 169 | if (!postProcess.DoPostProcess()) { |
| 170 | printf_err("Post-processing failed."); |
alexander | 27b62d9 | 2021-05-04 20:46:08 +0100 | [diff] [blame] | 171 | return false; |
| 172 | } |
alexander | 3c79893 | 2021-03-26 21:42:19 +0000 | [diff] [blame] | 173 | |
Richard Burton | c291144 | 2022-04-22 09:08:21 +0100 | [diff] [blame] | 174 | /* Add results from this window to our final results vector. */ |
Kshitij Sisodia | 2ea4623 | 2022-12-19 16:37:33 +0000 | [diff] [blame] | 175 | finalResults.emplace_back(asr::AsrResult( |
| 176 | singleInfResult, |
| 177 | (audioDataSlider.Index() * secondsPerSample * audioDataWindowStride), |
| 178 | audioDataSlider.Index(), |
| 179 | scoreThreshold)); |
alexander | 3c79893 | 2021-03-26 21:42:19 +0000 | [diff] [blame] | 180 | |
| 181 | #if VERIFY_TEST_OUTPUT |
Richard Burton | c291144 | 2022-04-22 09:08:21 +0100 | [diff] [blame] | 182 | armDumpTensor(outputTensor, |
Kshitij Sisodia | 2ea4623 | 2022-12-19 16:37:33 +0000 | [diff] [blame] | 183 | outputTensor->dims->data[Wav2LetterModel::ms_outputColsIdx]); |
| 184 | #endif /* VERIFY_TEST_OUTPUT */ |
Richard Burton | c291144 | 2022-04-22 09:08:21 +0100 | [diff] [blame] | 185 | } /* while (audioDataSlider.HasNext()) */ |
alexander | 3c79893 | 2021-03-26 21:42:19 +0000 | [diff] [blame] | 186 | |
| 187 | /* Erase. */ |
| 188 | str_inf = std::string(str_inf.size(), ' '); |
Kshitij Sisodia | 2ea4623 | 2022-12-19 16:37:33 +0000 | [diff] [blame] | 189 | hal_lcd_display_text( |
| 190 | str_inf.c_str(), str_inf.size(), dataPsnTxtInfStartX, dataPsnTxtInfStartY, 0); |
alexander | 3c79893 | 2021-03-26 21:42:19 +0000 | [diff] [blame] | 191 | |
Richard Burton | c291144 | 2022-04-22 09:08:21 +0100 | [diff] [blame] | 192 | ctx.Set<std::vector<asr::AsrResult>>("results", finalResults); |
alexander | 3c79893 | 2021-03-26 21:42:19 +0000 | [diff] [blame] | 193 | |
Richard Burton | c291144 | 2022-04-22 09:08:21 +0100 | [diff] [blame] | 194 | if (!PresentInferenceResult(finalResults)) { |
alexander | 3c79893 | 2021-03-26 21:42:19 +0000 | [diff] [blame] | 195 | return false; |
| 196 | } |
| 197 | |
Isabella Gottardi | 8df12f3 | 2021-04-07 17:15:31 +0100 | [diff] [blame] | 198 | profiler.PrintProfilingResult(); |
| 199 | |
Kshitij Sisodia | 2ea4623 | 2022-12-19 16:37:33 +0000 | [diff] [blame] | 200 | IncrementAppCtxIfmIdx(ctx, "clipIndex"); |
alexander | 3c79893 | 2021-03-26 21:42:19 +0000 | [diff] [blame] | 201 | |
Richard Burton | c291144 | 2022-04-22 09:08:21 +0100 | [diff] [blame] | 202 | } while (runAll && ctx.Get<uint32_t>("clipIndex") != initialClipIdx); |
alexander | 3c79893 | 2021-03-26 21:42:19 +0000 | [diff] [blame] | 203 | |
| 204 | return true; |
| 205 | } |
| 206 | |
Richard Burton | c291144 | 2022-04-22 09:08:21 +0100 | [diff] [blame] | 207 | static bool PresentInferenceResult(const std::vector<asr::AsrResult>& results) |
alexander | 3c79893 | 2021-03-26 21:42:19 +0000 | [diff] [blame] | 208 | { |
| 209 | constexpr uint32_t dataPsnTxtStartX1 = 20; |
| 210 | constexpr uint32_t dataPsnTxtStartY1 = 60; |
Kshitij Sisodia | 2ea4623 | 2022-12-19 16:37:33 +0000 | [diff] [blame] | 211 | constexpr bool allow_multiple_lines = true; |
alexander | 3c79893 | 2021-03-26 21:42:19 +0000 | [diff] [blame] | 212 | |
Kshitij Sisodia | 68fdd11 | 2022-04-06 13:03:20 +0100 | [diff] [blame] | 213 | hal_lcd_set_text_color(COLOR_GREEN); |
alexander | 3c79893 | 2021-03-26 21:42:19 +0000 | [diff] [blame] | 214 | |
Isabella Gottardi | 8df12f3 | 2021-04-07 17:15:31 +0100 | [diff] [blame] | 215 | info("Final results:\n"); |
| 216 | info("Total number of inferences: %zu\n", results.size()); |
alexander | 3c79893 | 2021-03-26 21:42:19 +0000 | [diff] [blame] | 217 | /* Results from multiple inferences should be combined before processing. */ |
Richard Burton | c291144 | 2022-04-22 09:08:21 +0100 | [diff] [blame] | 218 | std::vector<ClassificationResult> combinedResults; |
| 219 | for (const auto& result : results) { |
Kshitij Sisodia | 2ea4623 | 2022-12-19 16:37:33 +0000 | [diff] [blame] | 220 | combinedResults.insert( |
| 221 | combinedResults.end(), result.m_resultVec.begin(), result.m_resultVec.end()); |
alexander | 3c79893 | 2021-03-26 21:42:19 +0000 | [diff] [blame] | 222 | } |
| 223 | |
| 224 | /* Get each inference result string using the decoder. */ |
Richard Burton | c291144 | 2022-04-22 09:08:21 +0100 | [diff] [blame] | 225 | for (const auto& result : results) { |
alexander | 3c79893 | 2021-03-26 21:42:19 +0000 | [diff] [blame] | 226 | std::string infResultStr = audio::asr::DecodeOutput(result.m_resultVec); |
| 227 | |
Kshitij Sisodia | f9c19ea | 2021-05-07 16:08:14 +0100 | [diff] [blame] | 228 | info("For timestamp: %f (inference #: %" PRIu32 "); label: %s\n", |
Kshitij Sisodia | 2ea4623 | 2022-12-19 16:37:33 +0000 | [diff] [blame] | 229 | result.m_timeStamp, |
| 230 | result.m_inferenceNumber, |
Isabella Gottardi | 8df12f3 | 2021-04-07 17:15:31 +0100 | [diff] [blame] | 231 | infResultStr.c_str()); |
alexander | 3c79893 | 2021-03-26 21:42:19 +0000 | [diff] [blame] | 232 | } |
| 233 | |
| 234 | /* Get the decoded result for the combined result. */ |
| 235 | std::string finalResultStr = audio::asr::DecodeOutput(combinedResults); |
| 236 | |
Kshitij Sisodia | 2ea4623 | 2022-12-19 16:37:33 +0000 | [diff] [blame] | 237 | hal_lcd_display_text(finalResultStr.c_str(), |
| 238 | finalResultStr.size(), |
| 239 | dataPsnTxtStartX1, |
| 240 | dataPsnTxtStartY1, |
| 241 | allow_multiple_lines); |
alexander | 3c79893 | 2021-03-26 21:42:19 +0000 | [diff] [blame] | 242 | |
Isabella Gottardi | 8df12f3 | 2021-04-07 17:15:31 +0100 | [diff] [blame] | 243 | info("Complete recognition: %s\n", finalResultStr.c_str()); |
alexander | 3c79893 | 2021-03-26 21:42:19 +0000 | [diff] [blame] | 244 | return true; |
| 245 | } |
| 246 | |
| 247 | } /* namespace app */ |
| 248 | } /* namespace arm */ |