You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/learning-paths/embedded-and-microcontrollers/cmsisdsp-dev-with-python/how-to-1.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,7 +18,7 @@ The CMSIS-DSP Python package is a Python API for CMSIS-DSP. Its goal is to make
18
18
19
19
For this reason, the Python API is as close as possible to the C one.
20
20
21
-
Fixedpoint arithmetic is not often provided by Python packages which generally focus on floating-point operations. The CMSIS-DSP Python package provides the same fixedpoint arithmetic functions as the C version: Q31, Q15 and Q7. The package is also providing float functions and in the future will also provide half-precision floats like the C API.
21
+
Fixed-point arithmetic is rarely provided by Python packages, which generally focus on floating-point operations. The CMSIS-DSP Python package provides the same fixed-point arithmetic functions as the C version: Q31, Q15 and Q7. The package also provides floating-point functions and will also support half-precision floats in the future, like the C API.
22
22
23
-
Finally, the CMSIS-DSP Python package is compatible with NumPy and can be used with all other scientific and AI Python packages such as SciPy or PyTorch.
23
+
Finally, the CMSIS-DSP Python package is compatible with NumPy and can be used with all other scientific and AI Python packages such as SciPy and PyTorch.
- Computes the VAD signal for the full audio signal
114
-
- Applies the Hanning window to each slice
115
127
- Computes the FFT length that can be used for each slice
116
128
- Computes the padding needed for the FFT
117
129
118
130
The FFT length must be a power of 2. The slice length is not necessarily a power of 2. The constructor computes the closest usable power of 2. The audio slices are padded with zeros on both sides to match the required FFT length.
119
131
132
+
#### NoiseSuppressionReference constructor
133
+
134
+
```python
135
+
classNoiseSuppressionReference(NoiseSuppression):
136
+
def__init__(self,slices):
137
+
# In a better version this could be computed from the signal length by taking the
138
+
# smaller power of two greater than the signal length.
139
+
NoiseSuppression.__init__(self,slices)
140
+
141
+
# Compute the vad signal
142
+
self._vad=clean_vad([signal_vad(w) for w in slices])
Copy file name to clipboardExpand all lines: content/learning-paths/embedded-and-microcontrollers/cmsisdsp-dev-with-python/how-to-6.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -370,7 +370,7 @@ If the Python package has been built with Neon acceleration, it will use the new
370
370
371
371
If this temporary buffer is not provided, the Python package will allocate it automatically. While you can use the same API, this is less efficient.
372
372
373
-
It is better to detect than the package have been compiled with Neon acceleration, allocate a temporary buffer and use it in the FFT calls.
373
+
It is better to detect whether the package has been compiled with Neon acceleration, allocate a temporary buffer and use it in the FFT calls. This approach is closer to how the C API must be used.
0 commit comments