This commit is contained in:
Tilman Kamp 2019-08-20 10:25:07 +02:00
Родитель cc6507ef97
Коммит 3031f35561
1 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -210,10 +210,10 @@ def main(args):
segment_buffer, time_start, time_end = segment
time_length = time_end - time_start
if args.stt_min_duration and time_length < args.stt_min_duration:
logging.info('Fragment {}: Audio too short for STT'.format(index))
logging.info('Fragment {}: Audio too short for STT'.format(i))
continue
if args.stt_max_duration and time_length > args.stt_max_duration:
logging.info('Fragment {}: Audio too long for STT'.format(index))
logging.info('Fragment {}: Audio too long for STT'.format(i))
continue
logging.debug("Transcribing segment %002d (from %f to %f)..." % (i, time_start / 1000.0, time_end / 1000.0))
audio = np.frombuffer(segment_buffer, dtype=np.int16)