Presentation is loading. Please wait.

Presentation is loading. Please wait.

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

Similar presentations


Presentation on theme: "G.711 & Speex 簡介 Speaker :Fanjia Yen Adviser : Quincy Wu Date : 2007/11/15."— Presentation transcript:

1 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 Previous work Reference

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

4 http://www.ese.yamanashi.ac.jp/~itoyo/lecture/network/network02/ pcm.gif

5 G.711 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 取樣原理 低位數的差異 0000 0000 1111 1111 (255) 0000 0000 1111 0000 (240) 0000 1111 1111 1111 (4095) 0000 1111 0000 0000 (3840) 取較具影響的位數

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

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

9 Example 程式 使用 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? 一種聲音編碼方式 (codec) Application 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) 0 6 1 10 2 15 3 20 4 5 28 6 7 38 8 9 46 10 62 For every 320-bytes

13 Speex Tools – Windows Download http://downloads.us.xiph.org/releases/speex/sp eex-tools-win32-v1.2beta1.zip http://downloads.us.xiph.org/releases/speex/sp 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 建立迴聲 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 Previous Work 流程

19 Find a Hiding Space 總共可用空間 =160 bits =20 bytes

20 Hiding

21 Reference http://www.itu.int/rec/dologin_pub.asp?lang=e &id=T-REC-G.711-198811-I!!PDF- E&type=items http://www.itu.int/rec/dologin_pub.asp?lang=e &id=T-REC-G.711-198811-I!!PDF- E&type=items ITU-T G.711 pdf http://en.wikipedia.org/wiki/G.711 Wikipedia : G.711 http://www.speex.org/ Speex 網站 http://downloads.us.xiph.org/releases/speex/s peex-tools-win32-v1.2beta1.zip http://downloads.us.xiph.org/releases/speex/s peex-tools-win32-v1.2beta1.zip Speex - windows tools http://www.speex.org/docs/manual/speex- manual/ http://www.speex.org/docs/manual/speex- manual/ The Speex Codec Manual

22 Reference(2/2) http://en.wikipedia.org/wiki/Echo_cancellation


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

Similar presentations


Ads by Google