Scénario de test & Cas d'usage
Creation of 'COMMAND_INPUTS' with audio clips of inconsistent lengths (some short, some long).
| 1 | DATA casuser.command_inputs; LENGTH cmd_label $10 audio_clip $3000; INPUT cmd_label $ audio_clip $; DATALINES; |
| 2 | SHORT |
| 3 | LONG |
| 4 | ; RUN; |
| 1 | PROC CAS; |
| 2 | audio.computeFeatures / |
| 3 | TABLE={name='command_inputs', caslib='casuser'} |
| 4 | audioColumn='audio_clip' |
| 5 | frameExtractionOptions={windowType='HAMMING', frameLength=25, frameShift=10} |
| 6 | melBanksOptions={lowFreq=20, highFreq=4000} |
| 7 | nOutputFrames=50 |
| 8 | casOut={name='fixed_size_tensor', caslib='casuser', replace=true}; |
| 9 | RUN; |
The output table 'fixed_size_tensor' must contain exactly 50 frames for every input row. Short recordings are zero-padded, and long recordings are truncated to meet the 50-frame requirement.