ArmSoMプラットフォームのリファレンスは、フルRockchip技術ソースを維持します。 ボード、SOC、SDK/BSP、カーネル、オーディオハードウェア/ライブラリを検証します。ユニバーサルボードのサポートは要求されません。 ソース結果/ログはArmSoMテストではありません。 コマンドやハードウェア検証は行いません。
ソースV1.7.0は、VQEインターフェイス、モジュール、パラメータを説明しています。スコープはすべてのシリーズ/一般です。 中国語は中国人で、英語/ロシア語/ドイツ語は英語の原本を使用しています。 Rockchipスタジオでテストを実施し、ソース設定のみです。
1. . プロフィール {#1-overview}
1.1 音声アルゴリズムの特徴 {#11-audio-algorithm-features}
複数マイクロホン配列アルゴリズム、エコーキャンセルAEC、ビームフォーミングBF、音声ノイズ低減ANR、自動ゲインAGCなど 主に、マイクビームフォーミングBFが収集したスピーカーが再生する音を除去するために、EchoキャンセレーションAECが使用し、音声を高め、一貫性のある騒音と環境騒音の低減を抑制するために使用されます。マイク自動ゲインAGCが収集した環境騒音を除去するために使用されるスピーチノイズ低減ANRが使用されます。
2. . 音声アルゴリズムの説明 {#2-audio-algorithm-description}
マルチマイクアコースティック処理は、エコーのキャンセルと音声の強化タスクを主成分に仕上げています。
2.1 オーディオアルゴリズムモジュールの説明 {#21-audio-algorithm-module-description}
完全なアルゴリズムには、次の部分を含む図1に示すようにプロセスモジュールが含まれます。
2.1.1 補助モジュール {#211-auxiliary-modules}
これらのモジュールは、ハイパスフィルタ、プリエンファシス、デエンファシス、その他のモジュールを含みます。 それらの中で、高パスフィルタモジュールは低周波回路ノイズをフィルタアウトするために使用され、前方体は、音声の高周波エネルギーを高め、伝送プロセス中に高周波信号対ノイズ比を高め、その後、出力端でデエンファシスを介してそれを復元するために使用されます。
2.1.2 AECモジュール {#212-aec-module}
AECモジュールには、MDFモジュールとDelayモジュールが含まれます。 MDFモジュールは線形エコーの取消アルゴリズムに属し、ディレイモジュールはディテール信号とマイクロフォン信号間の遅延を推定するのに使用される遅延推定モジュールです
2.1.3 ビームフォーミングモジュール {#213-beamforming-module}
Beamforming (以下BF) モジュールには、FAST_AECモジュール、WAKEUPモジュール、ANRモジュール、Dereverbモジュール、AESモジュール、ACGモジュール、CNGモジュール、DTDモジュール、Howlingモジュール、EQモジュール、DOAモジュールが含まれます。 FAST_AECモジュール: 線形エコーの取消しアルゴリズム、残りのエコーWAKEUPモジュールを抑制するのに使用される: RKは、主に機械ANRモジュールを目覚めるために特定のウェイクアップ単語を完了しました: 騒音低減モジュール、環境騒音、風騒音、衝撃ノイズDereverbモジュールを抑制するために使用される: dereverberationモジュール、環境の反響AESモジュールを除去するのに使用される: 残りのエコーの取消しアルゴリズム、 残りのエコーをさらに抑制するために使用される; GSC モジュール: 入力がマルチマイクの可聴周波であるときデフォルトで有効であるビーム モジュール。 Fix/GSC/CHN_SELECTがさらに有効になっているとき、固定方向ビーム/ビームポスト-フィルタリング/カスタマイズされた拡張マイクが有効になっています。 AGCモジュール:音声レベル信号を制御するために使用される自動ゲインモジュール:快適なノイズモジュール、快適さノイズDTDモジュールを追加するために使用されます:音声通話ステータスのハリングモジュールを検出するために使用される二重トーク検出モジュール:セルフ励起によって生成された方法を削除する方法モジュール; EQモジュール:イコライザーモジュール、周波数帯域のゲインを調整するために使用される。DOAモジュール:音源の方向を見つけるために使用される音源ローカリゼーションモジュール;AINRモジュール:人間の声以外の騒音を抑制するために使用されるAIノイズリダクションモジュール。
2.2 音声アルゴリズムプロセス {#22-audio-algorithm-process}
マルチマイク配列アルゴリズムは、2つの異なるボイスチャンネルを提供します。
2.2.1 ウェイクアッププロセス {#221-wake-up-process}
ウェイクアップによる機械応答と位置決めを行い、ウェイクアップの人物の位置を音声で出力します。 図1に特定のプロセスが示されます。

図1 ウェイクアッププロセスシステムブロック図
-
配列が配列情報を収集した後、線形エコーはAECモジュールを最初に排除し、BFの組み込みFAST_AECはさらなるエコー抑制を実行します。
-
音声は固定ビーム出力によって高められます;
-
Derevb モジュールは残りの再燃を取除くために接続されます;
-
音源はWakeupのウェイクアップモジュールから設置されています。
-
位置の音声は、ポストフィルタリング用のGSCのポスト処理モジュールに送信されます(注:青矢印はクラウド認識プロセスであり、位置の音声はAGC出力に直接送信されます)。
-
処理された声は、さらにノイズ低減のために ANR モジュールに送られます。
-
最後に、音声ゲイン用のAGCモジュールに送信し、リモートエンドへ通信します。
2.2.2 コールプロセス {#222-calling-process}
目覚めさせない工程です。 ウェイクアップモジュールを除き、他のモジュールはウェイクアッププロセスと似ています。 図2に特定のプロセスが示されます。

図2 プロセスシステムブロック図の呼び出し
-
配列が配列情報を収集した後、線形エコーはAECモジュールによって最初に排除されます。
-
ANR/AINR、デレブ、およびAESモジュールは、それぞれノイズ、残響推定、および残留エコー除去を実行するために接続されています。
-
ビーム出力によって強化された音声は、音源ローカリゼーションと指向性サウンドピックアップをサポートしています。
-
最後に、音声ゲイン用のAGCとEQモジュールに送信し、コールのリモートエンドへ送信します。
2.3 音声アルゴリズムの実行効果の表示 {#23-audio-algorithm-running-effect-display}
2.3.1 AECモジュール効果 {#231-aec-module-effect}
マルチマイクコールアルゴリズムは、2つの異なるボイスチャネルを提供します。 以下は2つの異なるチャネルによって生成された効果です。 音声テストでは、WV2215スピーカーを使用し、マイクはMSM261D4030H1CPMを使用し、テスト環境はRockchipスタジオです。 スピーカーの周波数応答と歪み曲線は次のとおりです。 図3 WV2215周波数応答と歪み曲線


ウェイクアップとノイズ方式でアルゴリズム効果統計が実行されます。 左チャンネルは元の入力であり、アルゴリズム処理後の右チャンネルは出力です。 それらの中で、左図は周波数ドメインの数値であり、右図は純粋なノイズ範囲における時間ドメイン統計結果です。 リニアエコー解除効果 リニアエコー処理の結果は以下のとおりです。 音声は、プロの音響環境で測定されていないことに注意し、環境騒音があることに注意する必要があります。 結果は参考にのみです。


図4 リニアエコー解除システムのブロック図 このシナリオでは、エコーキャンセルは平均で30dB前後です。 非線形エコー解除効果 以下は非線形エコー処理の結果です。 音声は、プロの音響環境で測定されていないことに注意する必要があります。結果は参考にのみ表示されます。


図5 非線形エコー解除システムブロック図 このシナリオでは、エコーのキャンセルは平均で40dB前後です。
2.3.2 BFモジュール効果 {#232-bf-module-effect}
干渉試験は、以下のとおりです。 試験場はRockchipスタジオです。 音の音源から1mでデシベル値が70dBです。 マイク配列から5m先の音音源を試聴できます。 干渉音源から1mのデシベル値が64dBです。 干渉音源は、マイク配列から1m先です。Wake-upプロセス効果 一般的な環境でのウェイクアップテストです。 結果は参考にのみあります。


図6 ウェイクアッププロセス効果図 このシナリオでは、背景ノイズ除去は平均28dB前後です。 注意: 音声ウェイクアップは、音声の損傷を避けるために固定ビームのみを使用します。 呼び出しプロセス効果 一般的な環境でのコールテストでは、結果は参考にのみ行われます。


図7 このシナリオでは、平均的な背景ノイズ除去が約36dBであるコールプロセス効果図。
3. . 可聴周波アルゴリズムインターフェイスは記述を呼ぶ {#3-audio-algorithm-interface-call-description}
このライブラリの呼び出しプロセスは次のとおりです。
-
設定パラメータ:このステップは、マイクアルゴリズムに開くオーディオパラメータを設定するために使用されます。 それらの中で、ACE関連のパラメータの設定は、製品オーディオキャビティ、デバイス特性および使用要件に応じて調整する必要があります。 ご使用の際は、各製品の特性に合わせてパラメータを設定する必要があります。 デフォルトパラメータは初期統合に使用できます。そして、そのパラメータはエフェクトに応じて調整されます。 パラメータ設定は、rkaudio_preprocess.hファイルで調整され、初期化の入力パラメータとしてファイル名が使用されます。
-
初期化:
フレームで音信号フレームを処理する前に、呼び出しが開いた後にこのステップが使用されます。 初期化インターフェイス機能は rkaudio_preprocess_init と呼ばれ、特定の呼び出しは次のようにします。
st_ptr = rkaudio_preprocess_init(mSampleRate, mBitPerSample, num_src_channel,
num_ref_channel, ¶m);
それらの中、mSampleRateは8kHz、16kHz、24kHz、32kHz、44.1kHz、および48kHzの見本抽出率を支えます、mBitPerSampleの可聴周波ビット深さは16bit、num_src_channelはmicチャネルの数です、 num_ref_channelは再サンプルされたチャネルの数で、paramは入力変数です。 このパラメータは、rkaudio_preprocess.h で設定され、後で詳細に記述されます。 初期化は、アルゴリズムの内部パラメータと関連メモリリクエストの初期化を完了します。 初期化が成功すると、st_ptr構造が返されます。 初期化が失敗すると、構造はNULLになります。
- フレーム処理:このステップは、リアルタイムでコールボイス信号を処理することです。 本体はフレームです。 各フレームが16msで固定され、サンプリング速度は16kサンプルです。各フレームには256サンプルが含まれています。 フレーム処理には、インタフェース機能rkaudio_preprocess_shortが含まれており、特定の呼び出しは次のとおりです。
out_size = rkaudio_preprocess_short(st_ptr, (short*)in, out, in_size / 2, &is_wakeup);
それらの中、st_ptrは初期化後に生成された構造で、入力オーディオである、単位はバイトであり、出力オーディオ、ユニットは短く、in_sizeは1フレームで読み込まれるバイトの数です。つまり、256 * num_channel * 2。
- 説明とリリース:このステップは、呼び出し終了後にアルゴリズムメモリ変数を解放するために使われます。 インターフェイス機能は rkaudio_preprocess_destory (st_ptr) および rkaudio_param_deinit (¶m) です。
4. . 音声アルゴリズムパラメータのデバッグ手順 {#4-audio-algorithm-parameter-debugging-instructions}
マルチマイク配列アルゴリズムは、rkaudio_preprocess.hファイルで構成されます。
4.1 グローバルモジュールパラメータ設定 {#41-global-module-parameter-settings}
パラメータ設定は、主にAECモジュールとBFモジュールに分割され、AECモジュールがrkaudio_aec_param_init()機能で構成され、BFモジュールはrkaudio_preprocess_param_init()関数を介して構成されます。 以下は、入力オーディオのさまざまなチャネルの基本的な設定です。
#define NUM_CHANNEL 4 /* Set the total number of channels, that is, the sum of mic
channels and recollection channels */
#define NUM_REF_CHANNEL 2 /* Set the number of recollection channels, here set 2
recollection channels */
#define NUM_DROP_CHANNEL 0 /* Set the number of recollection channels not to be processed,
set to 0 for no discard, set to N (N>0) for discarding the last N channels of the
recollection path */
#define REF_POSITION 0 /* Recollection position, 0 for the recollection channel at the
front of the mic data, 1 for the back */
static short Array[NUM_CHANNEL] = { 0, 1, 2, 3}; /* Set the channel order for irregular
microphone adjustment */
4.2 AECモジュールパラメータ設定 {#42-aec-module-parameter-settings}
AEC モジュールはrkaudio_aec_param_init()機能によって構成され、主要な変数は次の通りです:各サブモジュールのスイッチは主にmodel_aec_enによって制御されます、主に下記のものを含んでいます:EN_DELAY、EN_ARRAY_RESET。 詳しくは、以下のコードコメントをご覧ください。
param->pos /* The position of the acquisition channel, assigned by the macro
REF_POSITION */
param->drop_ref_channel /* The number of acquisition channels not processed, assigned by the
macro NUM_DROP_CHANNEL */
param->model_aec_en /* Set to 0 to disable submodules other than linear AEC, set
EN_DELAY to enable delay estimation, soft acquisition must be enabled, set EN_ARRAY_RESET to
enable input audio channel order reordering */
param->delay_len /* The default hard acquisition delay point when delay estimation is
not enabled, and the starting delay estimation point when delay estimation is enabled */
param->look_ahead /* The length of the cached microphone data, unless it is known that
the acquisition microphone signal is later than the acquisition signal, it can be
configured, otherwise it is set to 0 by default */
param->Array_list /* Configure the order of audio channels, assigned by the array
Array */
param->filter_len /* Configure the linear AEC filter length. The longer the setting,
the more accurate the echo estimation, but the slower the convergence speed and the greater
the computing power. Generally, it can be configured to 2/4/6/8 */
param->delay_para = rkaudio_delay_param_init() /* Delay estimation submodule parameter
setting */
4.3 遅延推定サブモジュールパラメータ設定 {#43-delay-estimation-submodule-parameter-settings}
遅延モジュールは、rkaudio_delay_param_init() 関数で設定します。 主パラメーターは以下の通りです。
param->MaxFrame /* The maximum estimated number of frames for delay estimation. It is
recommended to set it to 16 in general scenarios */
param->LeastDelay /* The minimum estimated number of frames for delay estimation. It is
recommended to set it to 0 when MaxFrame is not particularly large */
param->JumpFrame /* The initial number of skipped frames. It is generally set to 12 */
param->DelayOffset /* The number of offset frames, which is used to prevent the microphone
signal from being delayed later than the collected signal due to excessive delay estimation.
It is generally set to 1 */
param->MicAmpThr /* The minimum energy threshold of the mic end. If it is lower than this
value, the delay estimation result will not be updated. It is generally set to 50 */
param->RefAmpThr /* The minimum energy threshold of the ref end. If it is lower than this
value, the delay estimation result will not be updated. It is generally set to 50 */
param->StartFreq /* The frequency of the start frequency band of delay estimation.
Generally, the frequency band where voice is concentrated is selected. It is adjusted
according to the actual sound reception effect. It is generally set to 500 */
param->EndFreq /* The frequency of the delay estimation termination band, generally
select the voice concentration band, adjust according to the actual sound reception effect,
generally set to 4000 */
param->SmoothFactor /* Smoothing coefficient, generally set to [0.95,1). The higher the
delay estimation result, the more stable it is, and the lower the delay estimation result,
the faster it is updated. Generally set to 0.97/0.99 */
4.4 BFモジュールパラメータ設定 {#44-bf-module-parameter-settings}
BFモジュールのサブモジュールは主に下記のものを含んでいます:EN_Fastaec、EN_Wakeup、EN_Dereverberation、EN_AES、EN_Agc、EN_Anr、EN_STDT、EN_CNG、EN_EQ、EN_HOWLING、EN_DOA、EN_WIND、EN_AINR、等。 詳しくは、以下のコードコメントをご覧ください。
typedef enum RKPreprocessEnable_
{
EN_Fastaec = 1 << 0, /* Linear residual echo cancellation module, this function
is used to further eliminate echo in the wake-up channel */
EN_Wakeup = 1 << 1, /* Wake-up module */
EN_Dereverberation = 1 << 2, /* De-reverberation module */
EN_Nlp = 1 << 3, /* Non-linear residual echo cancellation module, this
function is used to further eliminate echo in the call channel (this module has been
deprecated) */
EN_AES = 1 << 4, /* Non-linear residual echo cancellation module */
EN_Agc = 1 << 5, /* Automatic gain control module */
EN_Anr = 1 << 6, /* Noise suppression module */
EN_GSC = 1 << 7, /* Beam post-filter module, used to further eliminate
noise, whether to open or not depends on the actual effect */
GSC_Method = 1 << 8, /* If closed, GSC uses the LMS method, and if opened, GSC
uses the RLS method. The computing power of RLS is higher than that of the LMS algorithm */
EN_Fix = 1 << 9, /* Enable fixed direction beam */
EN_STDT = 1 << 10, /* Single and double talk detection module */
EN_CNG = 1 << 11, /* Comfort noise module */
EN_EQ = 1 << 12, /* EQ adjustment module */
EN_CHN_SELECT = 1 << 13, /* For customized expansion of MIC demand scenarios */
EN_HOWLING = 1 << 14, /* Howling removal module, whether to open or not depends
on the actual scenario requirements */
EN_DOA = 1 << 15, /* Sound source localization module, used to estimate the
direction of the sound source, whether to open it depends on the actual scene requirements
*/
EN_WIND = 1 << 16, /* Wind noise removal module, whether to open it depends on
the actual scene requirements */
EN_AINR = 1 << 17, /* AI noise reduction module, if this module is turned on,
the ANR module will be forced to close */
} RKPreprocessEnable;
BFモジュールはrkaudio_preprocess_param_init()機能によって構成されます。 主パラメーターは以下の通りです。
param->model_bf_en /* Submodule switch. Setting it to 0 means that the bf module does not
turn on any module in the non-multi-microphone case. When it is in the multi-microphone
case, the beam module will be run by default. The remaining submodules can be turned on and
off as needed */
param->Targ = 0; /* When EN_Fix is turned on, set the pickup direction */
param->ref_pos = REF_POSITION; /* The position of the acquisition channel, assigned by the
macro REF_POSITION */
param->num_ref_channel = NUM_REF_CHANNEL; /* The total number of acquisition channels,
assigned by the macro NUM_REF_CHANNEL */
param->drop_ref_channel = NUM_DROP_CHANNEL; /* The number of acquisition channels not
processed, assigned by the macro NUM_DROP_CHANNEL */
param->anr_para = rkaudio_anr_param_init_tx(); /* ANR module parameter configuration
*/
param->dereverb_para = rkaudio_dereverb_param_init(); /* De-reverberation module parameter
configuration */
param->aes_para = rkaudio_aes_param_init(); /* AES module parameter configuration
*/
param->dtd_para = rkaudio_dtd_param_init(); /* DTD module parameter configuration
*/
param->agc_para = rkaudio_agc_param_init(); /* AGC module parameter configuration
*/
param->cng_para = rkaudio_cng_param_init(); /* CNG module parameter configuration
*/
param->eq_para = rkaudio_eq_param_init(); /* EQ module parameter configuration
*/
param->howl_para = rkaudio_howl_param_init_tx(); /* Howl module parameter configuration
*/
param->doa_para = rkaudio_doa_param_init(); /* DOA module parameter configuration
*/
4.5 ANRモジュールのパラメータ設定 {#45-anr-module-parameter-settings}
騒音低減モジュールは、騒音低減や環境騒音除去に使用されます。 rkaudio_anr_param_init() 関数で構成されます。
param->noiseFactor /* Noise estimation level, generally in the range of [0.5f, 1.5f]. The
larger the value, the cleaner the noise elimination */
param->swU /* Noise estimation frame time slice, generally in the range of [2, 20]. The
larger the setting, the more accurate the estimation of stable noise, and the slower the
convergence of sudden noise; on the contrary, the faster the convergence of sudden noise,
but it is easy to cause voice over-elimination */
param->PsiMin /* Voice existence probability judgment threshold, in the range of [0.0f,
1.0f]. The larger the setting, the stronger the noise elimination effect */
param->PsiMax /* Voice existence probability judgment threshold, in the range of [0.0f,
1.0f]. The larger the setting, the stronger the noise elimination effect */
param->fGmin /* Minimum noise elimination value, value range [0.0f, 1.0f], the smaller the
setting, the stronger the noise elimination effect */
param->Sup_Freq1 /* Constant frequency noise suppression point 1, value range [0, 1/2*sample
rate], always suppress the set point noise */
param->Sup_Freq2 /* Constant frequency noise suppression point 2, value range [0, 1/2*sample
rate], always suppress the set point noise */
param->Sup_Energy1 /* Energy threshold corresponding to constant frequency noise suppression
point 1, generally 100000, when the frequency energy exceeds this value, the constant
frequency noise estimate will be updated */
param->Sup_Energy2 /* Energy threshold corresponding to constant frequency noise suppression
point 1, generally 100000, when the frequency energy exceeds this value, the constant
frequency noise estimate will be updated */
param->InterV /* Take the frame interval, generally in the range of [2,20]. The larger the
setting, the smoother the estimated noise, similar to the swU function */
param->BiasMin /* Noise compensation, generally in the range of [1.0f, 2.0f]. The larger the
setting, the stronger the noise elimination effect */
param->UpdateFrm /* Fast convergence length, generally set to 15, fast convergence in the
first 15 frames */
param->NPreGammaThr /* Pure noise probability estimation threshold, generally in the range
of (3.0f, 5.0f). The larger the setting, the stronger the noise elimination effect */
param->NPreZetaThr /* Pure noise probability estimation threshold, generally in the range of
(1.0f, 3.0f). The larger the setting, the stronger the noise elimination effect */
param->SabsGammaThr0 /* Speech non-existence probability estimation threshold, generally in
the range of (0.5f, 1.5f). The larger the setting, the stronger the noise elimination effect
*/
param->SabsGammaThr1 /* Threshold for probability estimation of speech absence, generally in
the range of (2.f, 4.0f), the larger the setting, the stronger the noise elimination
effect*/
param->InfSmooth /* Input signal smoothing coefficient, in the range of (0.0f, 1.0f) */
param->ProbSmooth /* Speech presence probability smoothing coefficient, in the range of
(0.0f, 1.0f) */
param->CompCoeff /* Noise compensation, generally in the range of [1.0f, 2.0f], for
frequency bands below the average noise estimate, compensation is performed, the larger the
setting, the stronger the noise elimination effect */
param->PrioriMin /* Priori signal-to-noise ratio minimum value, in the range of (0.0f,
0.5f), the larger the setting, the weaker the noise elimination effect */
param->PostMax /* Posteriori signal-to-noise ratio maximum value, generally set to 40 */
param->PrioriRatio /* Priori signal-to-noise ratio smoothing coefficient, value range (0.0f,
1.0f), the larger the setting, the stronger the noise elimination effect */
param->PrioriRatioLow /* Priori signal-to-noise ratio smoothing coefficient, value range
(0.0f, 1.0f), the larger the setting, the stronger the noise elimination effect */
param->SplitBand /* Split-band index, value range [0, 32], for the priori signal-to-noise
ratio below this index, use PrioriRatioLow for smoothing, otherwise use PrioriRatio */
param->PrioriSmooth /* Priori signal-to-noise ratio smoothing coefficient, value range
(0.0f, 1.0f), the larger the setting, the stronger the noise elimination effect */
param->TranMode /* Impulse noise switch, set to 0 for off, set to 1 for using the detection
elimination method, set to 2 for using the estimation elimination method */
4.6 AINR モジュールのパラメーター設定 {#46-ainr-module-parameter-settings}
従来のANRアルゴリズムと比較して、AINRモジュールは、様々な非安定した状態ノイズ(風騒音、衝撃騒音など)を除去するために強化されています。 AI騒音低減後の音はより自然です。 従来のANRを補完し、独自に、あるいは同時に協調ノイズ低減で動作させることができます。
param->mode = 2; /* Post-processing mode, optional modes 1 and 2, default mode 2. Mode 1 has
better voice protection and smoothing than mode 2, and is suitable for far-field small voice
scenarios; mode 2 has a greater noise reduction depth than mode 1, and is suitable for large
background noise scenarios */
param->alpha1 = 0.35; /* Smoothing coefficient, generally set to 0.35, value range [0,0.65]
*/
param->mini_gain = 0.01; /* Ambient sound retention ratio, value range [0.0,1.0], generally
set range [0.005,0.1], the larger the value, the greater the ambient sound retention */
param->pregain = 1.0; /* Pre-gain before the input audio is sent to AINR, the default value
is 1.0, and the value can be increased or decreased when the front-end gain is too low or
too high, resulting in abnormal effects */
/* The following are reserved parameters for expansion */
param->alpha2 = 0; /* Reserved parameters */
param->preserve1 = 0.0; /* Preserve parameter. When mode==1, this parameter is used as the
noise threshold. The larger the value, the more noise is eliminated. The recommended value
is: 1.0 */
param->preserve2 = 0.0; /* Preserve parameter. When mode==1, this parameter is used as the
voice threshold. The smaller the value, the more voice is preserved. The recommended value
range is: [4,6] */
param->preserve3 = 0; /* Preserve parameter */
param->preserve4 = 0; /* Preserve parameter */
4.7 De-reveration モジュールのパラメーターの設定 {#47-de-reverberation-module-parameter-settings}
収支除去には、非収支モジュールが使用されます。 モジュールは rkaudio_dereverb_param_init() によって構成されます:
param->rlsLg /* RLS filter order, used for wake-up module reverberation. Within a certain
range, the larger the order, the stronger the reverberation effect and the greater the
computing power consumption. The recommended value is: 4 */
param->curveLg /* Distribution curve order, used for call module reverberation. The larger
the order, the stronger the reverberation effect and the easier it is to over-cancel. The
recommended value is: 10 */
param->delay /* RLS filter delay, which determines the degree of early reverberation
retention. The recommended value is: 2 */
param->forgetting /* RLS filter forgetting factor. The smaller the factor, the stronger the
rls reverberation ability and the easier it is to over-cancel. The recommended range is:
0.98-0.999 */
param->T60 /* Reverberation time estimation value (unit: s). The larger the value, the
stronger the reverberation ability, but the easier it is to over-eliminate. The recommended
value is 0.68 for low reverberation scenes and 1.5 for medium and high reverberation scenes.
*/
param->coCoeff /* Mutual coherence adjustment coefficient to prevent over-elimination. The
smaller the value, the stronger the ability. The recommended value is 2 for low
reverberation scenes and 1 for medium and high reverberation scenes. */
4.8 AESモジュールパラメータ設定 {#48-aes-module-parameter-settings}
AESモジュールは非線形処理に使用されます。 rkaudio_aes_param_init() で設定します。
param->Beta_Up /* Rise speed, the larger the value, the stronger the nonlinear suppression,
the recommended range is 0.001-0.01 */
param->Beta_Down /* Decline speed, the larger the value, the weaker the nonlinear
suppression, the recommended range is 0.001-0.01 */
param->Beta_Up_Low /* Low frequency rise speed, characteristics and values ••are the same as
Beta_Up */
param->Beta_Down_Low /* Low frequency fall speed, characteristics and values ••are the same
as Beta_Down */
param->low_freq /* Low frequency segment */
param->high_freq /* High frequency segment */
param->THD_Flag /* Set to 1 to enable harmonic distortion suppression, set to 0 to disable
*/
param->HARD_Flag /* Set to 1 to enable Hard mode, which is stronger for echo cancellation
suppression, but may also cause voice over-cancellation */
int i, j;
/**
* The 3 columns correspond to the low frequency segment, the middle frequency segment, and
the high frequency segment (set by the low_freq and high freq above
* The first row indicates the minimum value of the residual echo ratio of each frequency
band. The recommended value range is [1.0f, 5.0f]. The larger the setting, the stronger the
echo cancellation effect
* The second row indicates the ratio of residual echo elimination of each frequency band.
The recommended value range is [1.0f, 3.0f]. The larger the setting, the stronger the echo
cancellation effect
*/
param->LimitRatio[2][3]
/**
* Harmonic suppression frequency band, up to 4 frequency bands can be set. If not needed,
this row can be set to 0
* Each row represents a frequency band. The first column indicates the starting point of
the frequency band, and the second column indicates the ending point of the frequency band.
The value range is [0,1/2*sample rate]
*/
param->ThdSplitFreq[4][2]
/**
* The degree of harmonic suppression corresponds to the four frequency bands in the table
above, and the corresponding elimination ratio is configured. When there are all 0 rows
above, the settings of the corresponding rows in the table will also be invalid.
* From the first column to the last column, they represent the ratio of the corresponding
fundamental frequency to be eliminated when the frequency band may become the second to
eleventh harmonics. The generally recommended value range is
* [0.001f, 1.0f]. The larger the setting, the stronger the elimination effect.
*/
param->ThdSupDegree[4][10]
/**
* The frequency band configured as Hard mode and the frequency band for calculating the
average gain. The first column indicates the start and the second column indicates the end.
The value range is
* [0, 1/2*sample rate]. The frequency band configured as Hard mode can be set to a maximum
of 4. The last line is the frequency band for calculating the average gain.
* This frequency band will be used in the next parameter HardThreshold.
*/
param->HardSplitFreq[5][2]
/**
* The threshold for turning on Hard mode. The 4 thresholds correspond to the 4 frequency
bands configured in the previous parameter.
* Use the average gain frequency band to compare with the threshold configured by this
parameter. When the average gain is lower than the threshold, the corresponding frequency
band will turn on the Hard mode.
*/
param->HardThreshold[4]
4.9 AGCモジュールパラメータ設定 {#49-agc-module-parameter-settings}
AGCモジュールは、スピーチを強化し、rkaudio_agc_param_init() 関数を介して構成されます。
param->attack_time = 400.0; /* Recommended range: 20~600ms. Trigger time, that is, the time
required for AGC gain to rise */
param->release_time = 400.0; /* Recommended range: 20~600ms. Release time, that is, the time
required for AGC gain to fall */
param->max_gain = 30.0; /* Recommended range: 0~50dB. Maximum gain, also the linear gain */
param->max_peak = -3.0; /* Value range: 0~-87dB. The maximum energy of the output speech
after AGC processing */
param->fRth0 = -65.0f; /* Value range: 0~-87dB. Noise gate threshold, speech below this
value will not be gained */
param->fRth1 = -60.0f; /* Value range: 0~-87dB. Energy dB threshold at the end of expansion
segment, speech above this value is gained at max_gain */
param->fRth2 = -35.0f; /* Value range: 0~-87dB. Energy dB threshold at the start of
compression segment, speech gain above this value gradually decreases to 0dB */
注1:圧縮セグメントは、次の条件を満たしていなければなりません。fRth2 + max_gainは0dB未満でなければ、max_peakよりも少ない必要があり、それ以外の場合はクリッピングが発生します。 注2:上記のパラメータは、AGCデバッグ用の有効なパラメーターであり、他のすべてのパラメータは廃止されます。 以前のバージョンでは、互換性の古いobsoleteパラメータを使用して保持する可能性があるため、その後のパラメータバージョンは、徐々に廃止されます。 そこで、ここは特にここに書かれています。
4.10 CNG パラメータ設定 {#410-cng-parameter-setting}
通話中に快適なノイズ(CNG)パラメータ設定を使用して、快適な白色ノイズを追加します。 録画工程にのみ存在し、このモジュールは通常オフになっています。
param->fSmoothAlpha /* Value range: 0.0f~1.0f, apply comfort noise smoothness, default 0.92
*/
param->fSpeechGain /* Value range: 0.0f~1.0f, apply comfort noise speech texture simulation
degree, default 0.3 */
param->fGain /* Recommended range: 0~50dB, apply comfort noise amplitude ratio, default 2 */
param->fMpy /* Recommended range: 0~50dB, white noise random number generation amplitude,
default 5 */
4.11 DTD モジュールの変数設定 {#411-dtd-module-parameter-setting}
DTD パラメータ設定は、音声が単一スピーカーまたはデュアルスピーカー状態にあるかどうかを判断するために使用されます。
param->ksiThd_high = 0.70f /* Single-speaker and double-speaker judgment threshold, ceil
threshold, above this threshold, it is judged as single-speaker */
param->ksiThd_low = 0.50f; /* floor threshold, below this threshold, it is judged as single-
speaker */
Note: この値は先頭のしきい値であり、現在のアルゴリズムは適応的な更新を使用します。
4.12 推奨パラメータ例 {#412-recommended-parameter-example}
ウェイクアップの推奨パラメータは以下の通りです。
param->model_bf_en = EN_Wakeup | EN_Fastaec | EN_STDT | EN_Agc;
音声通話の推奨パラメータは以下の通りです。
param->model_bf_en = EN_Fastaec | EN_STDT | EN_AES | EN_Anr | EN_Dereverberation | EN_Agc;
