Skip to content

Commit

Permalink
feat: skip special tokens
Browse files Browse the repository at this point in the history
  • Loading branch information
iyaja authored Mar 6, 2024
1 parent f611479 commit 11f77d0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion audiotools/core/whisper.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ def get_whisper_transcript(self, **kwargs) -> str:
input_features = input_features.to(self.whisper_device)
generated_ids = self.whisper_model.generate(input_features=input_features, **kwargs)

transcription = self.whisper_processor.batch_decode(generated_ids)
transcription = self.whisper_processor.batch_decode(generated_ids, skip_special_tokens=True)
return transcription[0]

def get_whisper_embeddings(self, **kwargs) -> torch.Tensor:
Expand Down

0 comments on commit 11f77d0

Please sign in to comment.