mirror of
https://github.com/modelscope/FunASR
synced 2025-09-15 14:48:36 +08:00
refine decoding process, merge flow and vocoder
This commit is contained in:
parent
d64ba60f40
commit
8d30c44144
@ -2377,13 +2377,13 @@ class LLMASR5(nn.Module):
|
||||
|
||||
if torch.any(top_ids == (self.codebook_size + self.ad_sos_eos)):
|
||||
hit_eos = True
|
||||
out_tokens = out_tokens[:, :out_token_len+1, :]
|
||||
break
|
||||
|
||||
out_tokens[0, out_token_len, 0] = top_ids[0]
|
||||
seq_input[0, prompt_len + out_token_len, :] = self.codec_embedder(top_ids)[0]
|
||||
out_token_len += 1
|
||||
|
||||
out_tokens = out_tokens[:, :out_token_len, :]
|
||||
if decoding_length is None:
|
||||
return out_tokens
|
||||
else:
|
||||
|
||||
Loading…
Reference in New Issue
Block a user