diff --git a/src/libtorchaudio/forced_align/cpu/compute.cpp b/src/libtorchaudio/forced_align/cpu/compute.cpp index fe0d0be9e4..81f5f0a459 100644 --- a/src/libtorchaudio/forced_align/cpu/compute.cpp +++ b/src/libtorchaudio/forced_align/cpu/compute.cpp @@ -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); diff --git a/src/libtorchaudio/forced_align/gpu/compute.cu b/src/libtorchaudio/forced_align/gpu/compute.cu index b23d52f1f3..52eb23bd1e 100644 --- a/src/libtorchaudio/forced_align/gpu/compute.cu +++ b/src/libtorchaudio/forced_align/gpu/compute.cu @@ -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);