Lines Matching +full:- +full:g
8 "# Simple keyword spotting with CMSIS-DSP Python wrapper and Arduino"
16 …"The goal of this notebook is to demonstrate how to use the CMSIS-DSP Python wrapper on an example…
22 "* Testing the CMSIS-DSP algorithm directly in Python\n",
24 …"* Implementation of the compute graph and streaming computation from the CMSIS-DSP Synchronous Da…
38 …"The machine learning is using scikit-learn. For scientific computations, we are using SciPy, NumP…
97 …"You can add other keywords but the CMSIS-DSP implementation in this notebook is only supporting o…
120 …"The below code is generating a label ID for a command. The ID will be -1 for any command not in t…
130 "UNKNOWN_CLASS = -1\n",
132 " return(pathlib.PurePath(name).parts[-2])\n",
161 " w = w-np.mean(w)\n",
162 " f=w[:-1]\n",
163 " g=w[1:]\n",
164 " k=np.count_nonzero(np.logical_and(f*g<0, g>f))\n",
193 " 16000 - waveform.shape[0],\n",
204 " winDuration=25e-3\n",
205 " audioOffsetDuration=10e-3\n",
208 " overlap=winLength-audioOffset\n",
227 …also be a random white noise. In that case, we also compute the feature and the class id is -1.\n",
340 "remaining_words=list(set(commands)-set(to_keep))\n",
350 "filenames += remaining[0:files_per_command-nb_noise]\n",
389 "nb_tests=nb_patterns-nb_train\n",
392 "test_patterns = patterns[-nb_tests:]"
443 …g/88APcAEgF3AQ0A3/9lAH0AQQEpAb4BNwH9AAsBpwFTAhAA2//R/0P/5f9o/0oAnwD2/9j/DQADALv+mP9AAKj/Bv+4/i//1/…
478 " # Zero-padding for an audio waveform with less than 16,000 samples.\n",
482 " 16000 - waveform.shape[0],\n",
503 …g//myLVQVHLCRLQ3vcu2F8VyGd2JjNSOZm0C+Te29W2mZCkOjVKUmTI9JfGfYRjRlKiPya6ZIhFZRoPCdBPTo8K5PPOdDOqFg0…
534 …p1y2Zmcw/dpaxoaCKi8/iAsDBNNC/lsqAEcaYGcC9wDIR+VwjtDHmOWNMpjEmMz7e8y80+p//240g/OzqKSdsHxYVwr2XjWfD/…
750 …model so that next time we want to play with the notebook and test the CMSIS-DSP implementation we…
796 …plementation which will be used to build the CMSIS-DSP implementation. We are no more using the sc…
813 " return(-1)\n",
823 …"And like in the code above with scikit-learn, we are checking the result with the confusion matri…
887 "## CMSIS-DSP implementation\n",
889 …"Now we are ready to implement the code using CMSIS-DSP API. Once we have a running implementation…
902 …ll be very similar to the implemenattion above with matrix but will instead use the CMSIS-DSP API."
925 " m = -m\n",
927 " f=w[:-1]\n",
928 " g=w[1:]\n",
929 " k=np.count_nonzero(np.logical_and(f*g<0, g>f))\n",
938 "For the FIR, CMSIS-DSP is using a FIR instance structure and thus we need to define it"
965 " 16000 - waveform.shape[0],\n",
972 " winDuration=25e-3\n",
973 " audioOffsetDuration=10e-3\n",
976 " overlap=winLength -audioOffset\n",
985 " stateLength = numTaps + blockSize - 1\n",
1045 " return(-1)\n",
1055 "And finally we can check the CMSIS-DSP behavior of the test patterns:"
1130 …"But we need values in [-1,1]. So we rescale those values and keep track of the shift required to …
1176 …" # Negate can saturate so we use CMSIS-DSP function which is working on array (and we have a s…
1180 " f=w[:-1]\n",
1181 " g=w[1:]\n",
1182 …unt_nonzero(np.logical_and(np.logical_or(np.logical_and(f>0,g<0), np.logical_and(f<0,g>0)),g>f))\n…
1218 " 16000 - waveform.shape[0],\n",
1225 " winDuration=25e-3\n",
1226 " audioOffsetDuration=10e-3\n",
1229 " overlap=winLength-audioOffset\n",
1237 " stateLength = numTaps + blockSize - 1\n",
1259 …p1y2Zmcw/dpaxoaCKi8/iAsDBNNC/lsqAEcaYGcC9wDIR+VwjtDHmOWNMpjEmMz7e8y80+p//240g/OzqKSdsHxYVwr2XjWfD/…
1298 " scaled=dsp.arm_shift_q31(np.array([intercept_q31]),intercept_shift-coef_shift)[0]\n",
1308 " return(-1)\n",
1339 …GT7D7ML0tZoaBCn/dt2HPP5YWw38gO22M5loeYU1oQrZctaJRNwtNB+e/r1SWBI0fF9gHOBgyOi+G/gOyKiISJmAZumbXsAN0d…
1428 …" # Negate can saturate so we use CMSIS-DSP function which is working on array (and we have a s…
1432 " f=w[:-1]\n",
1433 " g=w[1:]\n",
1434 …unt_nonzero(np.logical_and(np.logical_or(np.logical_and(f>0,g<0), np.logical_and(f<0,g>0)),g>f))\n…
1470 " 16000 - waveform.shape[0],\n",
1477 " winDuration=25e-3\n",
1478 " audioOffsetDuration=10e-3\n",
1481 " overlap=winLength - audioOffset\n",
1489 " stateLength = numTaps + blockSize - 1\n",
1531 " scaled=dsp.arm_shift_q15(np.array([intercept_q15]),intercept_shift-coef_shift)[0]\n",
1541 " return(-1)\n",
1620 …"So we are going to use the CMSIS-DSP Synchronous Data Flow framework to describe the compute grap…
1644 …"* A feature node to compute the feature for a given window (and pre-multipliying with the Hann wi…
1735 "winDuration=25e-3\n",
1736 "audioOffsetDuration=10e-3\n",
1774 … " sliding_audio=SlidingBuffer(\"audioWin\",q15Type,winLength,winLength-audio_input_length)\n",
1792 " g = Graph()\n",
1794 " g.connect(src.o, sliding_audio.i)\n",
1795 " g.connect(sliding_audio.o, feature.i)\n",
1796 " g.connect(feature.o, sliding_feature.i)\n",
1797 " g.connect(sliding_feature.o, fir.i)\n",
1798 " g.connect(fir.o, kws.i)\n",
1799 " g.connect(kws.o, sink.i)\n",
1809 " sched = g.computeSchedule(conf)\n",
1900 "We are using the `Yes/No` pattern from our `VHT-SystemModeling` example.\n",
1923 …"test_pattern_url=\"https://github.com/ARM-software/VHT-SystemModeling/blob/main/EchoCanceller/sou…
1947 …4buMIFzzeHDdUXN937/1sNnmjbKpMwOdiGVXnr8hUyOUpmLCD8ndLyZv/nhj9ZaiE1BYF3tOuNN/G/VzS8K7qPz4gk98vf/qxx…
2155 … is in `kws/AppNodes.h`. It is very similar to the `appnodes.py` but using the CMSIS-DSP C API.\n",
2203 "!arduino-cli board list"
2216 "Config file already exists, use --overwrite to discard the existing one.\n"
2221 "!arduino-cli config init"
2236 "Downloading Arduino_CMSIS-DSP@5.7.0...\n",
2237 "Arduino_CMSIS-DSP@5.7.0 already downloaded\n",
2238 "Installing Arduino_CMSIS-DSP@5.7.0...\n",
2239 "Already installed Arduino_CMSIS-DSP@5.7.0\n"
2244 "!arduino-cli lib install Arduino_CMSIS-DSP"
2252 …below command is executed, it will take a __very__ long time. The full CMSIS-DSP library has to be…
2272 "!arduino-cli compile -b arduino:mbed_nano:nano33ble kws"
2285 "Device : nRF52840-QIAA\n",
2286 "Version : Arduino Bootloader (SAM-BA extended) 2.0 [Arduino:IKXYZ]\n",
2331 "!arduino-cli upload -b arduino:mbed_nano:nano33ble -p COM5 kws"
2390 "application/vnd.jupyter.widget-view+json": {
2449 "mimetype": "text/x-python",