Presentation is loading. Please wait.

Presentation is loading. Please wait.

Speaker :Fanjia Yen Adviser : Quincy Wu Date : 2007/11/15

Similar presentations


Presentation on theme: "Speaker :Fanjia Yen Adviser : Quincy Wu Date : 2007/11/15"— Presentation transcript:

1 Speaker :Fanjia Yen Adviser : Quincy Wu Date : 2007/11/15
G.711 & Speex 簡介 Speaker :Fanjia Yen Adviser : Quincy Wu Date : 2007/11/15

2 Outline G.711 PCM A-law Speex Introduction Speex Tools – Windows
Speex - Acoustic Echo Cancellation Reference

3 PCM PCM (Pulse code modulation) 類比的聲音信號轉成數位信號 PCM分為三個步驟 取樣 量化 編碼
G.711國際標準 使用PCM

4

5 G.711編碼方式:將(PCM)16bits樣本訊息轉成 (G.711)8bits
A-law -law G.711編碼方式:將(PCM)16bits樣本訊息轉成 (G.711)8bits PCM(16) -> G.711(8) sender G.711(8) -> PCM(16) receiver

6 G.711取樣原理 低位數的差異 (255) (240) (4095) (3840) 取較具影響的位數

7 A-law 方法 對照表 當樣本是”正數”時 S(符號)表示為1 逢偶位數取補數  10011000 11001101

8 Example(1) 3100(0000110000011100)2 10011101 取s 對照表 逢偶位數取補數 s=1(正數)
3100( ) 取s s=1(正數) 對照表 逢偶位數取補數

9 Example程式 Demo 使用mediastreamer2的g711common.h
unsigned char s16_to_alaw(int pcm_val) 將 16bits 樣本 encode 成 8bits 的A-law碼 int alaw_to_s16(unsigned char a_val) 將 8bits 的A-law碼 decode 成 16bits 樣本 Demo

10 Introduction Speex? Application 一種聲音編碼方式(codec) Audio file VoIp
(6~62bytes)

11 Features 取樣率 8kHz,16kHz,32kHz(narrow,wideband,ultra- wideband) compression in the same bitstream 品質 Quality:0~10 Packet loss concealment Variable bitrate operation (VBR) Acoustic echo cancelle Noise suppression

12 Quality Frame_Size (Bytes) 6 1 10 2 15 3 20 4 5 28 7 38 8 9 46 62 For every 320-bytes

13 Speex Tools – Windows Download
eex-tools-win32-v1.2beta1.zip speexenc.exe speexenc input_file output_file (.wav) (.spx) speexenc –quality n input_file output_file n=0~10(quality) speexdec.exe speexdec input_file output_file (.spx) (.wav) Demo

14 Speex-Acoustic Echo Cancellation Acoustic Echo
影響VoIP因素之一 A B

15 Acoustic Echo Cancellation(迴聲消除器)
原理: A B

16 Speex-Acoustic Echo Cancellation #include <speex/speex_echo.h>
建立迴聲 SpeexEchoState *echo_state = speex_echo_state_init(frame_size, filter_length); filter_length 最好是房間內反射時間的1/3 ex:反射延遲300ms,filter_length就設100 執行AEC speex_echo_cancel(echo_state, input_frame, echo_frame, output_frame, residue);

17 input_frame:被捕捉到的聲音 echo_frame:要被消除掉的聲音 output_frame:處理完後輸出的聲音

18 Reference &id=T-REC-G I!!PDF- E&type=items ITU-T G.711 pdf Wikipedia : G.711 Speex網站 peex-tools-win32-v1.2beta1.zip Speex - windows tools manual/ The Speex Codec Manual

19 Reference(2/2)


Download ppt "Speaker :Fanjia Yen Adviser : Quincy Wu Date : 2007/11/15"

Similar presentations


Ads by Google