From f947ba5a85aee28b92f5f7f93a21741ece20358d Mon Sep 17 00:00:00 2001 From: Reuben Morais Date: Sun, 28 Jun 2020 22:03:45 +0200 Subject: [PATCH] Convert some leftover LabelsToString usage (fixup Alphabet API) --- native_client/ctcdecode/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/native_client/ctcdecode/__init__.py b/native_client/ctcdecode/__init__.py index 0b33388a31..ac603aa9ba 100644 --- a/native_client/ctcdecode/__init__.py +++ b/native_client/ctcdecode/__init__.py @@ -78,7 +78,7 @@ def ctc_beam_search_decoder(probs_seq, beam_results = swigwrapper.ctc_beam_search_decoder( probs_seq, alphabet, beam_size, cutoff_prob, cutoff_top_n, scorer) - beam_results = [(res.confidence, alphabet.LabelsToString(res.tokens)) for res in beam_results] + beam_results = [(res.confidence, alphabet.Decode(res.tokens)) for res in beam_results] return beam_results @@ -119,7 +119,7 @@ def ctc_beam_search_decoder_batch(probs_seq, """ batch_beam_results = swigwrapper.ctc_beam_search_decoder_batch(probs_seq, seq_lengths, alphabet, beam_size, num_processes, cutoff_prob, cutoff_top_n, scorer) batch_beam_results = [ - [(res.confidence, alphabet.LabelsToString(res.tokens)) for res in beam_results] + [(res.confidence, alphabet.Decode(res.tokens)) for res in beam_results] for beam_results in batch_beam_results ] return batch_beam_results