Skip to content
Snippets Groups Projects
Commit 9e9db94e authored by Benoit Favre's avatar Benoit Favre
Browse files

add auto break after 10 seconds

parent 75c6d183
No related branches found
No related tags found
No related merge requests found
......@@ -633,7 +633,7 @@ static void gst_kaldinnet2onlinedecoder_final_result(
Gstkaldinnet2onlinedecoder * filter, CompactLattice &clat,
int64 *tot_num_frames, double *tot_like, guint *num_words) {
if (clat.NumStates() == 0) {
KALDI_WARN<< "Empty lattice.";
//KALDI_WARN<< "Empty lattice.";
// ADDED
int hyp_length = 0;
GstBuffer *buffer = gst_buffer_new_and_alloc(hyp_length + 1);
......@@ -843,7 +843,7 @@ static void gst_kaldinnet2onlinedecoder_loop(
//fprintf(stderr, " END advance_decoding ()\n");
#endif
if (!more_data) {
fprintf(stderr, "BREAK !more_data\n");
//fprintf(stderr, "BREAK !more_data\n");
break;
}
//fprintf(stderr, "do_endpointing = %d\n", filter->do_endpointing);
......@@ -854,7 +854,7 @@ static void gst_kaldinnet2onlinedecoder_loop(
decoder.TerminateDecoding();
#endif
GST_DEBUG_OBJECT(filter, "Endpoint detected!");
fprintf(stderr, "BREAK end_point\n");
//fprintf(stderr, "BREAK end_point\n");
break;
}
num_seconds_decoded += filter->chunk_length_in_secs;
......@@ -867,6 +867,7 @@ static void gst_kaldinnet2onlinedecoder_loop(
gst_kaldinnet2onlinedecoder_partial_result(filter, lat);
last_traceback += traceback_period_secs;
}
if(num_seconds_decoded > 10) break; // BEN hack: auto break after 10 seconds
#endif
}
if (num_seconds_decoded > 0.1) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment