We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 02b7430 commit 9e653bdCopy full SHA for 9e653bd
whisper/decoding.py
@@ -615,7 +615,7 @@ def run(self, mel: Tensor) -> List[DecodingResult]:
615
n_audio: int = mel.shape[0]
616
617
audio_features: Tensor = self._get_audio_features(mel) # encoder forward pass
618
- tokens: Tensor = torch.tensor([self.initial_tokens]).expand(n_audio, -1)
+ tokens: Tensor = torch.tensor([self.initial_tokens]).repeat(n_audio, 1)
619
620
# detect language if requested, overwriting the language token
621
languages, language_probs = self._detect_language(audio_features, tokens)
0 commit comments