jtkim-kaist / VAD

Voice activity detection (VAD) toolkit including DNN, bDNN, LSTM and ACAM based VAD. We also provide our directly recorded dataset.
842 stars 235 forks source link

Hi I want to know why you multiply "TrueLabel_bin[iidx:iidx + wsize - 1]" by 10 in func Truelabel2Trueframe #36

Open Zyazz opened 4 years ago

Zyazz commented 4 years ago

`def Truelabel2Trueframe(TrueLabel_bin, wsize, wstep): iidx = 0 Frame_iidx = 0 Frame_len = Frame_Length(TrueLabel_bin, wstep, wsize) Detect = np.zeros([Frame_len, 1]) while 1: if iidx + wsize <= len(TrueLabel_bin): TrueLabel_frame = TrueLabel_bin[iidx:iidx + wsize - 1] 10 else: TrueLabel_frame = TrueLabel_bin[iidx:] 10

    if (np.sum(TrueLabel_frame) >= wsize / 2):
        TrueLabel_frame = 1
    else:
        TrueLabel_frame = 0

    if (Frame_iidx >= len(Detect)):
        break

    Detect[Frame_iidx] = TrueLabel_frame
    iidx = iidx + wstep
    Frame_iidx = Frame_iidx + 1
    if (iidx > len(TrueLabel_bin)):
        break

return Detect`

I want to know why you multiply "TrueLabel_bin[iidx:iidx + wsize - 1]" by 10