XCORE SDK
XCORE Software Development Kit
modules
voice
modules
lib_agc
api
agc_profiles.h
1
// Copyright 2022 XMOS LIMITED.
2
// This Software is subject to the terms of the XMOS Public Licence: Version 1.
3
#ifndef AGC_PROFILES_H
4
#define AGC_PROFILES_H
5
6
#include <xs3_math.h>
7
27
#define AGC_PROFILE_ASR (agc_config_t){ \
28
.adapt = 1, \
29
.adapt_on_vad = 1, \
30
.soft_clipping = 1, \
31
.gain = float_to_float_s32(500), \
32
.max_gain = float_to_float_s32(1000), \
33
.min_gain = float_to_float_s32(0), \
34
.upper_threshold = float_to_float_s32(0.9999), \
35
.lower_threshold = float_to_float_s32(0.7000), \
36
.gain_inc = float_to_float_s32(1.197), \
37
.gain_dec = float_to_float_s32(0.87), \
38
.lc_enabled = 0, \
39
.lc_n_frame_far = 0, \
40
.lc_n_frame_near = 0, \
41
.lc_corr_threshold = float_to_float_s32(0), \
42
.lc_bg_power_gamma = float_to_float_s32(0), \
43
.lc_gamma_inc = float_to_float_s32(0), \
44
.lc_gamma_dec = float_to_float_s32(0), \
45
.lc_far_delta = float_to_float_s32(0), \
46
.lc_near_delta = float_to_float_s32(0), \
47
.lc_near_delta_far_active = float_to_float_s32(0), \
48
.lc_gain_max = float_to_float_s32(0), \
49
.lc_gain_double_talk = float_to_float_s32(0), \
50
.lc_gain_silence = float_to_float_s32(0), \
51
.lc_gain_min = float_to_float_s32(0), \
52
}
53
59
#define AGC_PROFILE_FIXED_GAIN (agc_config_t){ \
60
.adapt = 0, \
61
.adapt_on_vad = 0, \
62
.soft_clipping = 0, \
63
.gain = float_to_float_s32(25), \
64
.max_gain = float_to_float_s32(0), \
65
.min_gain = float_to_float_s32(0), \
66
.upper_threshold = float_to_float_s32(0), \
67
.lower_threshold = float_to_float_s32(0), \
68
.gain_inc = float_to_float_s32(0), \
69
.gain_dec = float_to_float_s32(0), \
70
.lc_enabled = 0, \
71
.lc_n_frame_far = 0, \
72
.lc_n_frame_near = 0, \
73
.lc_corr_threshold = float_to_float_s32(0), \
74
.lc_bg_power_gamma = float_to_float_s32(0), \
75
.lc_gamma_inc = float_to_float_s32(0), \
76
.lc_gamma_dec = float_to_float_s32(0), \
77
.lc_far_delta = float_to_float_s32(0), \
78
.lc_near_delta = float_to_float_s32(0), \
79
.lc_near_delta_far_active = float_to_float_s32(0), \
80
.lc_gain_max = float_to_float_s32(0), \
81
.lc_gain_double_talk = float_to_float_s32(0), \
82
.lc_gain_silence = float_to_float_s32(0), \
83
.lc_gain_min = float_to_float_s32(0), \
84
}
85
86
87
#endif
Generated by
1.9.1