Skip to content

Commit 7619d2c

Browse files
author
Sean Naren
authored
Ensure labels are a list before calling the c++ api
1 parent 3268f58 commit 7619d2c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ctcdecode/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ def __init__(self, labels, model_path=None, alpha=0, beta=0, cutoff_top_n=40, cu
99
self._beam_width = beam_width
1010
self._scorer = None
1111
self._num_processes = num_processes
12-
self._labels = labels
12+
self._labels = list(labels) # Ensure labels are a list
1313
self._num_labels = len(labels)
1414
self._blank_id = blank_id
1515
self._log_probs = 1 if log_probs_input else 0

0 commit comments

Comments
 (0)