The number of resulting windows depends on the {@link #PROP_WINDOW_SIZE_MS window size} and the {@link #PROP_WINDOW_SHIFT_MS windowshift} (commonly known as frame shift in speech world). Figure 1 shows the relationship between the original datastream, the window size, the window shift, and the windows returned.
Figure 1: Relationship between original data, window size, window shift, and the windows returned.
The raised cosine windowing function will be applied to each such window. Since the {@link #getData()} method returns awindow, and multiple windows are created for each Data object, this is a 1-to-many processor. Also note that the returned windows should have the same number of data points as the windowing function.
The applied windowing function, W(n), of length N (the window size), is given by the following formula:
W(n) = (1-a) - (a * cos((2 * Math.PI * n)/(N - 1)))where a is commonly known as the "alpha" value. This variable can be set by the user using the property defined by {@link #PROP_ALPHA}. Please follow the links to the see the constant field values. Some values of alpha receive special names, since they are used so often. A value of 0.46 for the alpha results in a window named Hamming window. A value of 0.5 results in the Hanning window. And a value of 0 results in the Rectangular window. The default for this system is the Hamming window, with alpha 0.46 !). Figure 2 below shows the Hamming window function (a = 0.46), using our default window size of 25.625 ms and assuming a sample rate of 16kHz, thus yielding 410 samples per window.
Figure 2: The Hamming window function.
@see Data
|
|