pjsip迴音消除
pjsip迴音消除
1. pjmedia_echo_flag enum 初始化引數
- 演算法位 掩碼: PJMEDIA_ECHO_ALGO_MASK = 15,
演算法型別:
PJMEDIA_ECHO_DEFAULT = 0 預設也是speex
PJMEDIA_ECHO_SPEEX = 1
PJMEDIA_ECHO_SIMPLE = 2
PJMEDIA_ECHO_WEBRTC = 3
提取方式 (option & PJMEDIA_ECHO_ALGO_MASK); //取最後位元組
- 僅使用軟體實現
PJMEDIA_ECHO_USE_SW_ECHO = 64,
- 同時也使用噪音抑制
PJMEDIA_ECHO_USE_NOISE_SUPPRESSOR = 128, (0x80)
- 迴音消除的激烈模式
PJMEDIA_ECHO_AGGRESSIVENESS_MASK = 0xF00, //掩碼位
PJMEDIA_ECHO_AGGRESSIVENESS_DEFAULT = 0, 預設moderate
PJMEDIA_ECHO_AGGRESSIVENESS_CONSERVATIVE = 0x100,
PJMEDIA_ECHO_AGGRESSIVENESS_MODERATE = 0x200,
PJMEDIA_ECHO_AGGRESSIVENESS_AGGRESSIVE = 0x300,
2. pjmedia_echo_stat 統計資訊
- median, Echo delay median value (in ms).
- std, Echo delay standard deviation (in ms).
- frac_delay, Fraction of poor delay. Value between 0 to 1.
- learning, Learning still in progress?
- duration,Learning duration (in ms).
- tail,Detected echo tail length (in ms).
- min_factor,Minimum scaling factor (in ms).
- avg_factor, Average scaling factor (in ms).
- buf_, Internal buffer.
3. 建立、重置、銷燬
- pjmedia_echo_create
- pjmedia_echo_create2
- pjmedia_echo_reset
- pjmedia_echo_destroy
4. 獲取統計資訊
- pjmedia_echo_get_stat
5. 迴音消除處理邏輯
- pjmedia_echo_playback 送給喇叭之前先發給ec
- pjmedia_echo_capture 麥克風採集到資料先發給ec
- pjmedia_echo_cancel 進行迴音消除處理\噪音抑制, 得到結果
「其他文章」