ZHCABF0A December   2021  – April 2022 PCM6120-Q1 , TLV320ADC5120 , TLV320ADC6120

 

  1.   使用 TLV320ADC5120_PCM5120-Q1 和 TLV320ADC6120_PCM6120-Q1 中的语音活动检测器 (VAD)
  2.   商标
  3. 1引言
  4. 2语音活动检测器
    1. 2.1 VAD 配置
    2. 2.2 VAD 参数
  5. 3VAD 结果
  6. 4示例
  7. 5相关文档
  8. 6修订历史记录

示例

本节提供了两个有关如何配置 VAD 的示例。

示例 1:以下示例代码显示了在通道 1 上使用 VAD 和模拟麦克风所需的配置。


# Key: w 9C XX YY ==> write to I2C address 0x9C, to register 0xXX, data 0xYY
#               # ==> comment delimiter
# See the corresponding EVM user guide for jumper settings and audio connections.
################################################################
#
#
# Power up IOVDD and AVDD power supplies 
# Wait for 1ms.
#
w 9C 00 00 # Goto Page 0
w 9C 02 81 # Wake-up device by I2C write into P0_R2  # Exit Sleep mode
d 10       # Wait for 16 ms
w 9c 00 00 # go to page 9
w 9c 50 00 72 59 dc # -7dB threshold
w 9C 00 00 # Goto Page 0
w 9c 3c a0 # channel 1 set to LINE , SE , AC , 2.5k , DRE disabled
w 9c 73 80 # ip channel 1 enabled
w 9c 74 80 # ASI out ch 1 enabled
w 9c 21 00 # GPIO1 as IRQ (latched only) driving high and low
w 9c 00 01 # go to page 1
w 9c 1e 00 # Channel 1 as VAD input, User mode , internal clk
w 9c 1f 00 # VAD disabled in recording mode
w 9c 00 00 # go to page 0

w 9c 75 21 # Enable VAD

示例 2:以下示例代码显示了在通道 1 上使用 VAD 和数字麦克风所需的配置。

# Key: w 9C XX YY ==> write to I2C address 0x9C, to register 0xXX, data 0xYY
#               # ==> comment delimiter
# See the corresponding EVM user guide for jumper settings and audio connections.
################################################################
#
#
# Power up IOVDD and AVDD power supplies 
# Wait for 1ms.
#
w 9C 00 00 # Goto Page 0
w 9C 02 81 # Wake-up device by I2C write into P0_R2  # Exit Sleep mode
d 10       # Wait for 16 ms
w 9c 00 00 # go to page 9
w 9c 50 00 72 59 dc # -7dB threshold
w 9C 00 00 # Goto Page 0
w 9c 3c 40 # Ch1 configured as Digital microphone PDM input
w 9c 41 40 # Ch2 configured as Digital microphone PDM input

w 9c 73 C0 # ip channel 1 and channel 2 enabled
w 9c 74 C0 # ASI out ch 1 and ch 2 enabled
w 9c 21 21 # GPIO1 as IRQ
w 9c 22 41 # GPO1 as PDM CLK
w 9c 2b 45 # gpi1 as Ch1/2 DMIC data
w 9c 20 00 # gpi1 neg edge as ch1

w 9c 00 01 # go to page 1
w 9c 1e 00 # Channel 1 as VAD input, User mode , internal clk
w 9c 1f 00 # VAD disabled in recording mode
w 9c 00 00 # go to page 0w 9c 75 21 # Enable VAD