mirror of
https://github.com/modelscope/FunASR
synced 2025-09-15 14:48:36 +08:00
Fix timestamp prediction on empty ASR outputs
_, timestamp = ts_prediction_lfr6_standard(us_alphas[i], ValueError: not enough values to unpack (expected 2, got 0) If char_list is empty, we should still return both the text (which is empty string) and the timestamps to fit the function signature.
This commit is contained in:
parent
4986ec2dd3
commit
3b3aebb124
@ -17,7 +17,7 @@ def ts_prediction_lfr6_standard(us_alphas,
|
||||
sil_in_str=True
|
||||
):
|
||||
if not len(char_list):
|
||||
return []
|
||||
return "", []
|
||||
START_END_THRESHOLD = 5
|
||||
MAX_TOKEN_DURATION = 12
|
||||
TIME_RATE = 10.0 * 6 / 1000 / 3 # 3 times upsampled
|
||||
|
||||
Loading…
Reference in New Issue
Block a user