Question about SpecAugment

i want to use the same specAgment parameters as this paper:
" We use
SpecAugment [27, 28] with mask parameter (F = 27), and ten
time masks with maximum time-mask ratio (pS = 0.05), where
the maximum-size of the time mask is set to pS times the length
of the utterance."

here’s my code:

def feature_augmentation(spec,audio_length):
    p=0.05
    masking = FrequencyMasking(freq_mask_param=27)
    spec = masking(spec)
    spec = masking(spec)
    masking = TimeMasking(time_mask_param=80,p=p*audio_length)
    for _ in range(0,5):
        spec = masking(spec)

    return spec

could someone please tell me if i did it right ? any help would be highly appreciated!