Skip to content

[src] CudaDecoder endpointing #4146

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Jul 15, 2020
Merged

Conversation

hugovbraun
Copy link
Contributor

Built on top of #4101. Probably better to look at the diff once #4101 has been merged.

Implements endpointing directly into the cuda decoder.

Uses the rules as defined in online2/online-endpoint.h. From a user point of view, setting the high level parameters on endpointing and passing a vector in the DecodeBatch should be enough:

  void DecodeBatch(const std::vector<CorrelationID> &corr_ids,
                   const std::vector<SubVector<BaseFloat>> &wave_samples,
                   const std::vector<bool> &is_first_chunk,
                   const std::vector<bool> &is_last_chunk,
                   std::vector<std::string *> *partial_hypotheses = NULL,
                   std::vector<bool> *end_points = NULL)

Parameters (from online2/online-endpoint.h):

--endpoint.rule1.max-relative-cost : This endpointing rule requires relative-cost of final-states to be <= this value (describes how good the probability of final-states is). (float, default = inf)
--endpoint.rule1.min-trailing-silence : This endpointing rule requires duration of trailing silence(in seconds) to be >= this value. (float, default = 5)
--endpoint.rule1.min-utterance-length : This endpointing rule requires utterance-length (in seconds) to be >= this value. (float, default = 0)
--endpoint.rule1.must-contain-nonsilence : If true, for this endpointing rule to apply there mustbe nonsilence in the best-path traceback. (bool, default = false)

Easiest way to test is to pass --print-endpoints=true to the binary src/cudadecoderbin/batched-wav-nnet3-cuda-online

Internally, it provides all the necessary metrics (relative cost, number of silence phones on current best path, total length). Those rules can be modified through the command line parameters.

@kkm000
Copy link
Contributor

kkm000 commented Jul 1, 2020

Thanks! So, you'd say that both #4101 and this one are ready to merge?

Copy link
Contributor

@kkm000 kkm000 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two of my comments to the other PR no longer apply. I'll mark them there.

@hugovbraun
Copy link
Contributor Author

@kkm000 The known issue was fixed and we don't have any known bugs now

@kkm000
Copy link
Contributor

kkm000 commented Jul 15, 2020

Thanks much! Merging.

@kkm000 kkm000 merged commit 083c64d into kaldi-asr:master Jul 15, 2020
@auzxb
Copy link

auzxb commented Jul 16, 2020

A bug happened in this commit

cuda-decoder.h:851:3: error: ‘atomic_int32_t’ in namespace ‘std’ does not name a type std::atomic_int32_t n_partial_traceback_threads_todo_;

@kkm000
Copy link
Contributor

kkm000 commented Jul 17, 2020

@auzxb, this is fixed in #4173 today. Please open a new issue when reporting a big, we won't notice otherwise.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants