Skip to content

Commit

Permalink
Small adjustment
Browse files Browse the repository at this point in the history
  • Loading branch information
mryndzionek committed Jul 29, 2024
1 parent 3049aa6 commit 8bb47c8
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions src/fbank.c
Original file line number Diff line number Diff line change
Expand Up @@ -1302,9 +1302,16 @@ static void powspec(const float input[FRAME_LEN], float output[NUM_FFT_BINS])
fft_plan = fft_create_plan_radix2(NUM_FFT, in, out);
}

for (size_t i = 0; i < FRAME_LEN; i++)
for (size_t i = 0; i < NUM_FFT; i++)
{
in[i] = input[i];
if (i < FRAME_LEN)
{
in[i] = input[i];
}
else
{
in[i] = 0.0 + 0.0 * I;
}
}

fft_execute_radix2(fft_plan);
Expand Down Expand Up @@ -1382,7 +1389,7 @@ static const float LSTM4[1][1][32] = {{{0.0f}}};

void fbank_speech_detect(float input[NUM_FRAMES][NUM_FILT], size_t *label, float *logit)
{
float logits[9][6];
float logits[9][NUM_LABELS];
size_t max_idx;
float max_log;

Expand All @@ -1395,7 +1402,7 @@ void fbank_speech_detect(float input[NUM_FRAMES][NUM_FILT], size_t *label, float

for (size_t i = 0; i < 9; i++)
{
for (size_t j = 0; j < 6; j++)
for (size_t j = 0; j < NUM_LABELS; j++)
{
if ((i == 0) && (j == 0))
{
Expand Down

0 comments on commit 8bb47c8

Please sign in to comment.