
#EDIT THIS: Put voice IDs here
VOICE_IDS = []


RESULT = []

id_start = 0
prev = 0
running_ids = False


for i in sorted(VOICE_IDS):
    if not running_ids:
        running_ids = True
        id_start = i
        prev = i
    if running_ids and (i - prev > 1):
        if prev - id_start > 0:
            RESULT.append([id_start, prev])
        else:
            RESULT.append(prev)
        id_start = i
    prev = i
if prev - id_start > 0:
    RESULT.append([id_start, prev])
else:
    RESULT.append(prev)

print(RESULT)
FLATTED = []
for item in RESULT:
    if isinstance(item, list):
        for i in item:
            FLATTED.append(i)
    else:
        FLATTED.append(item)

print(f"Original: {len(VOICE_IDS)}; Minified: {len(FLATTED)}")