SHSDataset.py
def loadSHSMFCCs(IDs):
    """
    Load all of the 12-dim MFCC features
    """
    IDDict = getSHSIDDict()
    fin = open("SHSDataset/MFCC/bt_aligned_mfccs_shs.txt")
    mfccs = {}
    count = 0
    while True:
        ID = fin.readline().rstrip()
        if not ID:
            break
        ID = IDDict[ID]
        if count%1000 == 0:
            print("Loaded mfccs for %i songs..."%count)
        if not ID in IDs:
            fin.readline()
            count += 1
            continue
        x = fin.readline().rstrip()
        x = x.split(",")
        if len(x[-1]) == 0:
            x = x[0:-1]
        x = np.array([float(a) for a in x])
        x = np.reshape(x, (len(x)/12, 12))
        mfccs[ID] = x
        count += 1
    fin.close()
    return mfccs

    Load all of the 12-dim MFCC features
    
Load all of the 12-dim MFCC features
Load all of the 12 - dim MFCC features
def loadSHSMFCCs(IDs):
    IDDict = getSHSIDDict()
    fin = open("SHSDataset/MFCC/bt_aligned_mfccs_shs.txt")
    mfccs = {}
    count = 0
    while True:
        ID = fin.readline().rstrip()
        if not ID:
            break
        ID = IDDict[ID]
        if count%1000 == 0:
            print("Loaded mfccs for %i songs..."%count)
        if not ID in IDs:
            fin.readline()
            count += 1
            continue
        x = fin.readline().rstrip()
        x = x.split(",")
        if len(x[-1]) == 0:
            x = x[0:-1]
        x = np.array([float(a) for a in x])
        x = np.reshape(x, (len(x)/12, 12))
        mfccs[ID] = x
        count += 1
    fin.close()
    return mfccs
def loadSHSMFCCs ( IDs ) : IDDict = getSHSIDDict ( ) fin = open ( "SHSDataset/MFCC/bt_aligned_mfccs_shs.txt" ) mfccs = { } count = 0 while True : ID = fin . readline ( ) . rstrip ( ) if not ID : break ID = IDDict [ ID ] if count % 1000 == 0 : print ( "Loaded mfccs for %i songs..." % count ) if not ID in IDs : fin . readline ( ) count += 1 continue x = fin . readline ( ) . rstrip ( ) x = x . split ( "," ) if len ( x [ - 1 ] ) == 0 : x = x [ 0 : - 1 ] x = np . array ( [ float ( a ) for a in x ] ) x = np . reshape ( x , ( len ( x ) / 12 , 12 ) ) mfccs [ ID ] = x count += 1 fin . close ( ) return mfccs
Load all of the 12-dim MFCC features
Load all of the 12 - dim MFCC features
"""
    Load all of the 12-dim MFCC features
    """
IDs