STM32_AI_AudioPreprocessing_Library
Variables
common_tables.c File Reference

This file has common tables like fft windows, melfilterbanks, dct matrix etc which are used across different functions. More...

#include "common_tables.h"
Include dependency graph for common_tables.c:

Variables

const float32_t hannWin_1024 [1024]
 Hann Window.
 
const float32_t hannWin_2048 [2048]
 Hann Window.
 
const float32_t hammingWin_1024 [1024]
 Hamming Window.
 
const float32_t blackmanWin_1024 [1024]
 Blackman Window.
 
const uint32_t melFiltersStartIndices_1024_30 [30]
 Mel filter start indices for a 1024 points power spectrum slice with 30 mel bands.
 
const uint32_t melFiltersStopIndices_1024_30 [30]
 Mel filter stop indices for a 1024 points power spectrum slice with 30 mel bands.
 
const float32_t melFilterLut_1024_30 [968]
 Mel filter weights for a 1024 points power spectrum slice with 30 mel bands.
 
const uint32_t melFiltersStartIndices_2048_128 [128]
 Mel filter start indices for a 2048 points power spectrum slice with 128 mel bands.
 
const uint32_t melFiltersStopIndices_2048_128 [128]
 Mel filter stop indices for a 2048 points power spectrum slice with 128 mel bands.
 
const float32_t melFilterLut_2048_128 [2020]
 Mel filter weights for a 2048 points power spectrum slice with 128 mel bands.
 

Detailed Description

This file has common tables like fft windows, melfilterbanks, dct matrix etc which are used across different functions.

Author
MCD Application Team
Attention

Copyright (c) 2023 STMicroelectronics. All rights reserved.

This software is licensed under terms that can be found in the LICENSE file in the root directory of this software component. If no LICENSE file comes with this software, it is provided AS-IS.

Variable Documentation

◆ blackmanWin_1024

const float32_t blackmanWin_1024[1024]

Blackman Window.

Example code for Blackman Window Generation:
for(i = 0; i < N; i++)
{
  hannWin[i]= 0.42 - 0.5 * cos(2 * i * PI / (float) N) + 0.8 * cos(2 * i * PI / (float) N);
} 
where N = 1024 and PI = 3.14159265358979

◆ hammingWin_1024

const float32_t hammingWin_1024[1024]

Hamming Window.

Example code for Hamming Window Generation:
for(i = 0; i < N; i++)
{
  hannWin[i]= 0.54 - 0.46 * cos(2 * i * PI / (float) N);
} 
where N = 1024 and PI = 3.14159265358979

◆ hannWin_1024

const float32_t hannWin_1024[1024]

Hann Window.

Example code for Hann Window Generation:
for(i = 0; i < N; i++)
{
  hannWin[i]= 0.5 - 0.5 * cos(2 * i * PI / (float) N);
} 
where N = 1024 and PI = 3.14159265358979

◆ hannWin_2048

const float32_t hannWin_2048[2048]

Hann Window.

Example code for Hann Window Generation:
for(i = 0; i < N; i++)
{
  hannWin[i]= 0.5 - 0.5 * cos(2 * i * PI / (float) N);
} 
where N = 2048 and PI = 3.14159265358979

◆ melFiltersStartIndices_1024_30

const uint32_t melFiltersStartIndices_1024_30[30]
Initial value:
= {
1, 7, 13, 19, 25, 32, 38, 44, 50, 57, 63, 69, 77, 85, 93,
103, 114, 126, 139, 154, 170, 188, 208, 230, 254, 281, 311, 343, 379, 419
}

Mel filter start indices for a 1024 points power spectrum slice with 30 mel bands.

◆ melFiltersStartIndices_2048_128

const uint32_t melFiltersStartIndices_2048_128[128]
Initial value:
= {
1, 3, 6, 9, 12, 15, 18, 21, 24, 27,
30, 33, 36, 39, 42, 45, 48, 51, 54, 57,
60, 63, 66, 69, 72, 75, 78, 81, 84, 87,
90, 93, 96, 99, 102, 105, 108, 111, 114, 117,
120, 123, 126, 129, 132, 136, 139, 142, 146, 149,
153, 157, 160, 164, 168, 172, 177, 181, 185, 190,
194, 199, 204, 209, 214, 219, 225, 230, 236, 241,
247, 253, 260, 266, 272, 279, 286, 293, 300, 307,
315, 322, 330, 338, 346, 355, 364, 372, 381, 391,
400, 410, 420, 430, 441, 452, 463, 474, 485, 497,
509, 522, 534, 548, 561, 575, 589, 603, 618, 633,
648, 664, 680, 697, 714, 731, 749, 767, 786, 805,
825, 845, 865, 887, 908, 930, 953, 976
}

Mel filter start indices for a 2048 points power spectrum slice with 128 mel bands.

◆ melFiltersStopIndices_1024_30

const uint32_t melFiltersStopIndices_1024_30[30]
Initial value:
= {
12, 18, 24, 31, 37, 43, 49, 56, 62, 68, 76, 84, 92, 102, 113,
125, 138, 153, 169, 187, 207, 229, 253, 280, 310, 342, 378, 418, 463, 511
}

Mel filter stop indices for a 1024 points power spectrum slice with 30 mel bands.

◆ melFiltersStopIndices_2048_128

const uint32_t melFiltersStopIndices_2048_128[128]
Initial value:
= {
5, 8, 11, 14, 17, 20, 23, 26, 29, 32,
35, 38, 41, 44, 47, 50, 53, 56, 59, 62,
65, 68, 71, 74, 77, 80, 83, 86, 89, 92,
95, 98, 101, 104, 107, 110, 113, 116, 119, 122,
125, 128, 131, 135, 138, 141, 145, 148, 152, 156,
159, 163, 167, 171, 176, 180, 184, 189, 193, 198,
203, 208, 213, 218, 224, 229, 235, 240, 246, 252,
259, 265, 271, 278, 285, 292, 299, 306, 314, 321,
329, 337, 345, 354, 363, 371, 380, 390, 399, 409,
419, 429, 440, 451, 462, 473, 484, 496, 508, 521,
533, 547, 560, 574, 588, 602, 617, 632, 647, 663,
679, 696, 713, 730, 748, 766, 785, 804, 824, 844,
864, 886, 907, 929, 952, 975, 999, 1023
}

Mel filter stop indices for a 2048 points power spectrum slice with 128 mel bands.