AlexHung29629 commited on
Commit
8b70f5d
1 Parent(s): e6851d5

Update ultravox_processing.py

Browse files
Files changed (1) hide show
  1. 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."