Skip to content

Commit b7b7b5d

Browse files
authored
Fix document for forced_align method (#3748)
The lengths of targets and log_probs should be reversed.
1 parent 5286f9f commit b7b7b5d

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/libtorchaudio/forced_align/cpu/compute.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,9 @@ void forced_align_impl(
4242
}
4343
TORCH_CHECK(
4444
T >= L + R,
45-
"targets length is too long for CTC. Found targets length: ",
45+
"targets length is too long for CTC. Found log_probs length: ",
4646
T,
47-
", log_probs length: ",
47+
", targets length: ",
4848
L,
4949
", and number of repeats: ",
5050
R);

src/libtorchaudio/forced_align/gpu/compute.cu

+2-2
Original file line numberDiff line numberDiff line change
@@ -160,9 +160,9 @@ void forced_align_impl(
160160
}
161161
TORCH_CHECK(
162162
T >= L + R,
163-
"targets length is too long for CTC. Found targets length: ",
163+
"targets length is too long for CTC. Found log_probs length: ",
164164
T,
165-
", log_probs length: ",
165+
", targets length: ",
166166
L,
167167
", and number of repeats: ",
168168
R);

0 commit comments

Comments
 (0)