Update ultravox_processing.py
Browse files- ultravox_processing.py +1 -1
ultravox_processing.py
CHANGED
|
@@ -165,7 +165,7 @@ class UltravoxProcessor(transformers.ProcessorMixin):
|
|
| 165 |
#), "Text must be a string. Batch mode not supported yet."
|
| 166 |
data["audio_token_start_idx"] = []
|
| 167 |
for t in text:
|
| 168 |
-
assert self.audio_placeholder in t
|
| 169 |
if "audio_token_len" not in data:
|
| 170 |
raise ValueError(
|
| 171 |
f"audio must be provided when using audio placeholder ({self.audio_placeholder}) in text."
|
|
|
|
| 165 |
#), "Text must be a string. Batch mode not supported yet."
|
| 166 |
data["audio_token_start_idx"] = []
|
| 167 |
for t in text:
|
| 168 |
+
assert self.audio_placeholder in t, f"audio must be provided when using audio placeholder ({self.audio_placeholder}) in text: {t=}."
|
| 169 |
if "audio_token_len" not in data:
|
| 170 |
raise ValueError(
|
| 171 |
f"audio must be provided when using audio placeholder ({self.audio_placeholder}) in text."
|