Skip to content

Commit

Permalink
Fix document for forced_align method (#3748)
Browse files Browse the repository at this point in the history
The lengths of targets and log_probs should be reversed.
  • Loading branch information
nateanl authored Feb 16, 2024
1 parent 5286f9f commit b7b7b5d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/libtorchaudio/forced_align/cpu/compute.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ void forced_align_impl(
}
TORCH_CHECK(
T >= L + R,
"targets length is too long for CTC. Found targets length: ",
"targets length is too long for CTC. Found log_probs length: ",
T,
", log_probs length: ",
", targets length: ",
L,
", and number of repeats: ",
R);
Expand Down
4 changes: 2 additions & 2 deletions src/libtorchaudio/forced_align/gpu/compute.cu
Original file line number Diff line number Diff line change
Expand Up @@ -160,9 +160,9 @@ void forced_align_impl(
}
TORCH_CHECK(
T >= L + R,
"targets length is too long for CTC. Found targets length: ",
"targets length is too long for CTC. Found log_probs length: ",
T,
", log_probs length: ",
", targets length: ",
L,
", and number of repeats: ",
R);
Expand Down

0 comments on commit b7b7b5d

Please sign in to comment.