Commit
·
fd428c8
1
Parent(s):
5ed95ec
update
Browse files
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 |
-
|
| 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([])
|