From: Jaechul Lee Date: Mon, 5 Jul 2021 02:07:06 +0000 (+0900) Subject: Enable agc, denoise, dereverb X-Git-Tag: accepted/tizen/6.5/unified/20211028.124248~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6c354a3f22627b7a44a1c180a68a639c8192a676;p=platform%2Fcore%2Fmultimedia%2Flibmm-sound.git Enable agc, denoise, dereverb agc, denoise and dereverb are enabled to improve voice recognition ratio. [Version] 0.13.12 [Issue Type] Add Change-Id: Ib88c1afee0cd3f46b9c9e4833c8cc2db67f6fc14 Signed-off-by: Jaechul Lee --- diff --git a/aec/algo_speex.c b/aec/algo_speex.c index 60e762d..e20c6a7 100644 --- a/aec/algo_speex.c +++ b/aec/algo_speex.c @@ -57,6 +57,7 @@ ec_operation_t *get_speex_instance() static int speex_init(int nframes, int rate, int channels) { + spx_int32_t value = 1; sp.nframes = nframes; sp.filter_frames = nframes; /* TODO:It takes much time when 10 times of nframe */ sp.channels = channels; @@ -83,6 +84,21 @@ static int speex_init(int nframes, int rate, int channels) return -1; } + if (speex_preprocess_ctl(sp.preprocess, SPEEX_PREPROCESS_SET_AGC, &value)) { + LOGE("speex_echo_ctl SPEEX_PREPROCESS_SET_AGC failed\n"); + return -1; + } + + if (speex_preprocess_ctl(sp.preprocess, SPEEX_PREPROCESS_SET_DENOISE, &value)) { + LOGE("speex_echo_ctl SPEEX_PREPROCESS_SET_DENOISE failed\n"); + return -1; + } + + if (speex_preprocess_ctl(sp.preprocess, SPEEX_PREPROCESS_SET_DEREVERB, &value)) { + LOGE("speex_echo_ctl SPEEX_PREPROCESS_SET_DEREVERB failed\n"); + return -1; + } + if (speex_preprocess_ctl(sp.preprocess, SPEEX_PREPROCESS_SET_ECHO_STATE, sp.echo_state)) { LOGE("speex_echo_ctl SET_ECHO_STATE failed\n"); return -1; diff --git a/aec/loopback.c b/aec/loopback.c index 305cc4a..3a6b63b 100644 --- a/aec/loopback.c +++ b/aec/loopback.c @@ -908,7 +908,7 @@ static int __print_buffer(loopback_t *loopback) loopback->name, capture, playback, sq_get_work_node_count(loopback->q)); if (loopback->refq) - LOGE("refq delay(%d)", sq_get_work_node_count(loopback->refq)); + LOGD("refq delay(%d)", sq_get_work_node_count(loopback->refq)); return 0; } diff --git a/packaging/libmm-sound.spec b/packaging/libmm-sound.spec index 968f2ed..a2f1879 100644 --- a/packaging/libmm-sound.spec +++ b/packaging/libmm-sound.spec @@ -1,6 +1,6 @@ Name: libmm-sound Summary: MMSound Package contains client lib and focus server binary -Version: 0.13.11 +Version: 0.13.12 Release: 0 Group: System/Libraries License: Apache-2.0