10.6. Related Tests

10.6.1. singleTest

Test purpose: TestAudio AECFunction

Test module: Audio VQE - AEC

Test method: sample_audio_aec $(filename)

Description: usercanwillafter passing through echoStatusundercaptureofaudiofile(raw or.wav),

throughcvi_aec_test program, willrawFileConversionafter passing through echoafteraudiofile.

Note that this function supports only 8 kHz and 16 kHz sample rates, and the format must be S16LE.

This test is for developers using the VQE source code. To use the VQE function, refer to sample_audio 10.

Test purpose: TestAudio encodingDecodingFunction

Test module: Audio Encode/Decode

Test method: sample_audio_transcode $(filename)

Description: usercanthroughsample_audio_transcode, willaudio raw data withg.711/g.726performfileFormatConversion.

Note that this function supports only 8 kHz and 16 kHz sample rates, and the format must be S16LE.

thisTestisdevelopersTestencodingDecodingsourcecodeUse, If using rneed toUseencodingDecodingFunctionPlease refer tosample_audio 0-3.

10.6.2. FunctionTest

Test purpose: TestAudio recordingFunction

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: TestAudio playbackFunction

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: TestAudio resampling

Test module: Audio Resample

Test method: sample_audio_resample (Input_rawFormat) (InputSample rate)(DestinationSample rate)

Description:

UseFor exampleunder: sample_audio_resample record.raw 16000 48000

ifonthe, usersequentiallyInputrawfile, beforefileSample rateandDestinationSample rate,

programwillaccording to libcvi_RES1.soinAPIperform fileresampling,

endafterwillwithOutputSample rateisraw.

thisTestisdevelopersTestresamplingUse, If using rneed toUseresamplingFunctionPlease refer tosample_audio 4-5.

Test purpose: AudioOutputVolumeSetandTest

Test module: Audio Output Volume(DAC codec)

Test method:(SetVolume): sample_audio 6 (GetbeforeOutputVolume): sample_audio 8

Description: Usercanthroughsample_audio 6 SetVolume.

10.6.3. performanceTest

Test purpose: TestAudio audioFunctionTest, according to Parametertuning, speechalgorithmforshouldcapability.

Test module: Audio VQE

Test method: sample_audio_nr $(filename)

Description: insample_audio_nr andInput.wavfile, willsequentiallyVQERelatedswitchandFunctionParameter,

SupportNR(speechnoise reductionFunction)andAGC(automatic gain control).

Useexample:

---------------------------

Enter NR off:0, On:1: 1

---------------------------

Enter AGC off:0, On:1: 1

pstAiVqeAttr.u32OpenMask[0x0C]

Enter agc_max_gain [0, 6]

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

ifonthe, AGC(automatic gain control)hasgroupParametercanprovideSet,

NR(speechnoise reductionFunction)hastwogroupParameter,

usercanReferencesection9.2.2combinedWhen underenvironmentParameter,

programendafterwillaccording to Inputfile, NR_AGC_etc..

usercanforthisfileperform audioortocalculateonAudioresult.

This test is for developers using the VQE source code. To use the VQE function, refer to sample_audio 10.