def segs2flags(segStart, segEnd, segLabel, winSize):
    flags = []
    classNames = list(set(segLabel))
    curPos = winSize / 2.0
    while curPos < segEnd[-1]:
        for i in range(len(segStart)):
            if curPos > segStart[i] and curPos <= segEnd[i]:
                break
        flags.append(classNames.index(segLabel[i]))
        curPos += winSize
    return numpy.array(flags), classNames
Copies information from this model to provided entity.
dataset/ETHPy150Open tyiannak/pyAudioAnalysis/audioSegmentation.py/segs2flags--crossover with--dataset/ETHPy150Open CollabQ/CollabQ/.google_appengine/google/appengine/ext/db/__init__.py/Model._to_entity