def PrintSegmentStats():
    global segment_total_length, num_segments, num_utterances, num_utterances_without_segments, total_length_of_utterances
    print(('Number of utterances is %d, of which %.2f%% had no segments after all processing; total length of data in original utterances (in seconds) was %d' % (num_utterances, ((num_utterances_without_segments * 100.0) / num_utterances), total_length_of_utterances)), file=sys.stderr)
    keys = sorted(segment_total_length.keys())
    for i in range(len(keys)):
        key = keys[i]
        if (i > 0):
            delta_percentage = ('[%+.2f%%]' % (((segment_total_length[key] - segment_total_length[keys[(i - 1)]]) * 100.0) / total_length_of_utterances))
        print(('At %s, num-segments is %d, total length %.2f%% of original total %s' % (key, num_segments[key], ((segment_total_length[key] * 100.0) / total_length_of_utterances), (delta_percentage if (i > 0) else ''))), file=sys.stderr)
def PrintSegmentStats():
    global segment_total_length, num_segments, num_utterances, num_utterances_without_segments, total_length_of_utterances
    print(('Number of utterances is %d, of which %.2f%% had no segments after all processing; total length of data in original utterances (in seconds) was %d' % (num_utterances, ((num_utterances_without_segments * 100.0) / num_utterances), total_length_of_utterances)), file=sys.stderr)
    keys = sorted(segment_total_length.keys())
    for i in range(len(keys)):
        key = keys[i]
        if (i > 0):
            delta_percentage = ('[%+.2f%%]' % (((segment_total_length[key] - segment_total_length[keys[(i - 1)]]) * 100.0) / total_length_of_utterances))
        print(('At %s, num-segments is %d, total length %.2f%% of original total %s' % (key, num_segments[key], ((segment_total_length[key] * 100.0) / total_length_of_utterances), (delta_percentage if (i > 0) else ))), file=sys.stderr)