MediaProcessingSoftwareDevelopmentReference
master

Contents

  • 1. Disclaimer
  • 2. System Overview
  • 3. System Control
  • 4. Video Input
  • 5. Video Output
  • 6. Video Processing Subsystem
  • 7. Video Encoding
  • 8. Video Decoding
  • 9. Regional Management
  • 10. Audio Frequency
    • 10.1. Function Overview
    • 10.2. Design Overview
    • 10.3. API Reference
    • 10.4. Data Types
    • 10.5. Error Codes
    • 10.6. Related Tests
      • 10.6.1. Unit Test
      • 10.6.2. Functional Test
      • 10.6.3. Performance Test
    • 10.7. Sample Code and Board-side Component Preliminary Testing
  • 11. Geometric Distortion Correction Subsystem
  • 12. Proc Debugging Information Explanation
MediaProcessingSoftwareDevelopmentReference
  • »
  • 10. Audio Frequency »
  • 10.6. Related Tests
  • 返回文档中心

10.6. Related Tests¶

10.6.1. Unit Test¶

Test purpose:

the Audio AEC function test

Test module:

Audio VQE - AEC

Test method:

sample_audio_aec $(filename)

Note:Users can use the cvi_aec_test program to convert recorded audiofiles (raw or .wav) with echo to audio files with echo cancelled.Please note that this function only supports sampling rates of 8kHzand 16kHz, and the format must be S16LE.

Test purpose:

Audio Codec function test

Test module:

Audio Encode/Decode

Test method:

sample_audio_transcode $(filename)

Note:Users can convert audio raw data to g.711/g.726 files throughsample_audio_transcode. Please note that this function only supports8kHz and 16kHz sampling rates, and its format must be S16LE.

10.6.2. Functional Test¶

Test purpose:

Audio Recording function test

Test module:

Audio In

Test method:

sample_audio 4

./sample_audio 4 –list -r 8000 -R 8000 -c 2 -p 320 -C 0 -V 0 -FCvi_8k_2chn.raw -T 10

Test purpose:

Audio broadcasting function test

Test module:

Audio Out

Test method:

sample_audio 5

./sample_audio 5 –list -r 8000 -R 8000 -c 2 -p 320 -C 0 -V 0 -FCvi_8k_2chn.raw -T 10

Test purpose:

Audio resampling test

Test module:

Audio Resample

Test method:

sample_audio_resample

(input _raw format file)

(inputfile sample rate)

(target sample rate)

Note:Examples are as follows:sample_audio_resample record.raw 16000 48000As shown above, the user inputs the raw file in order. The programwill resample the file according to the current sampling rate andtarget sampling rate of the file according to the API inlibcvi_RES1.so. After that, the raw file starting with the outputsampling rate will be output.

Test purpose:

Audio output volume setting and test

Test module:

Audio Output Volume(DAC codec)

Test method:

(set volume): sample_audio 6

(Get the current output volume): sample_audio 8

Note:Users can set the volume through sample audio 6.

10.6.3. Performance Test¶

Test purpose: test the function of Audio quality enhancement, andmeasure the corresponding ability of speech algorithm according toparameter adjustment.

Test module:: Audio VQE

Test method: sample_audio_nr $(filename)

Note: type sample_audio_nr and input. Wav file, VQE related switches and function parameters will be inquired in order, support NR (noise reduction) and AGC (automatic gain control). Usage example: —————————– Enter NR off:0 , On:1 : 1 —————————– Enter AGC off:0 , On:1 : 1 pstAiVqeAttr.u32OpenMask[0x28] Enter agc_max_gain [0, 3] 1 Enter agc_target_high [0, 36] 2 Enter agc_target_low [0, 36] 6 Enter agc_vad_enable [0, 1] 1 Enter agc_vad_cnt [1, 25] 13 Enter agc_cut6_enable [0, 1] 1 AGC param: [1, 2, 6, 1, 13, 1] Enter nr_snr_coeff [0, 20] 15 Enter nr_noise_coeff [0, 14] 2 As shown above, AGC (automatic gain control) has six groups of parameters to set, and NR (noise reduction) has two groups of parameters.

Users can refer to chapter 9.2.2 to allocate the parameters suitable for the current environment.

After the program is finished, the file name starting with NR_AGC will be output according to the input file name.

Users can dial the file or put it on the computer to analyze the audio results.

Previous Next

© Copyright 2023, CVITEK.

Built with Sphinx using a theme provided by Read the Docs.
  • 本页二维码