Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion python/vosk/transcriber/transcriber.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,8 @@ def pool_worker(self, inputdata):
fh.write(processed_result)
else:
print(processed_result)

if tot_samples == 0:
raise ValueError("Value of total samples is 0. Please check if input is an audio and try again")
elapsed = timer() - start_time
logging.info("Execution time: {:.3f} sec; "\
"xRT {:.3f}".format(elapsed, float(elapsed) * (2 * SAMPLE_RATE) / tot_samples))
Expand Down