sleeper371 commited on
Commit
fd428c8
·
1 Parent(s): 5ed95ec
Files changed (1) hide show
  1. core/bark/generate_semantic.py +1 -1
core/bark/generate_semantic.py CHANGED
@@ -32,7 +32,7 @@ def generate_semantic_tokens_from_text(
32
  ) -> torch.Tensor:
33
  # trim white spaces and replace redundant white space characters
34
  texts = _preprocess_texts(texts)
35
- assert all([len(text) > 0 for text in texts]), f"invalid input text {texts}"
36
 
37
  if semantic_prompt is None:
38
  semantic_prompt = torch.tensor([])
 
32
  ) -> torch.Tensor:
33
  # trim white spaces and replace redundant white space characters
34
  texts = _preprocess_texts(texts)
35
+ texts = [text for text in texts if len(text) > 0]
36
 
37
  if semantic_prompt is None:
38
  semantic_prompt = torch.tensor([])