Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
gst-kaldi-nnet2-online
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
homeostasis
gst-kaldi-nnet2-online
Commits
9e9db94e
Commit
9e9db94e
authored
10 years ago
by
Benoit Favre
Browse files
Options
Downloads
Patches
Plain Diff
add auto break after 10 seconds
parent
75c6d183
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/gstkaldinnet2onlinedecoder.cc
+4
-3
4 additions, 3 deletions
src/gstkaldinnet2onlinedecoder.cc
with
4 additions
and
3 deletions
src/gstkaldinnet2onlinedecoder.cc
+
4
−
3
View file @
9e9db94e
...
...
@@ -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
)
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment