mirror of
https://github.com/modelscope/FunASR
synced 2025-09-15 14:48:36 +08:00
update frontend in pipeline
This commit is contained in:
parent
1582bad4b5
commit
3610b3f48a
@ -148,11 +148,11 @@ class SpeechText2Timestamp:
|
||||
# Input as audio signal
|
||||
if isinstance(speech, np.ndarray):
|
||||
speech = torch.tensor(speech)
|
||||
|
||||
if self.frontend is not None:
|
||||
feats, feats_len = self.frontend.forward(speech, speech_lengths)
|
||||
feats = to_device(feats, device=self.device)
|
||||
feats_len = feats_len.int()
|
||||
self.tp_model.frontend = None
|
||||
else:
|
||||
feats = speech
|
||||
feats_len = speech_lengths
|
||||
|
||||
Loading…
Reference in New Issue
Block a user