farzadab commited on
Commit
d5b56e4
1 Parent(s): f5641c2

Update ultravox_pipeline.py

Browse files
Files changed (1) hide show
  1. ultravox_pipeline.py +5 -3
ultravox_pipeline.py CHANGED
@@ -23,12 +23,14 @@ class UltravoxPipeline(transformers.Pipeline):
23
  )
24
 
25
  if audio_processor is None:
26
- audio_processor = transformers.Wav2Vec2Processor.from_pretrained(
27
- model.config.audio_model_id
28
  )
29
 
30
  self.processor = UltravoxProcessor(
31
- audio_processor, tokenizer=tokenizer, stack_factor=model.config.stack_factor
 
 
32
  )
33
 
34
  super().__init__(model=model, tokenizer=tokenizer, **kwargs)
 
23
  )
24
 
25
  if audio_processor is None:
26
+ audio_processor = transformers.AutoProcessor.from_pretrained(
27
+ model.config.audio_model_id or model.config.audio_config._name_or_path
28
  )
29
 
30
  self.processor = UltravoxProcessor(
31
+ audio_processor=audio_processor,
32
+ tokenizer=tokenizer,
33
+ stack_factor=model.config.stack_factor,
34
  )
35
 
36
  super().__init__(model=model, tokenizer=tokenizer, **kwargs)