"vscode:/vscode.git/clone" did not exist on "d31497b196f3ea7fc55cbfa187f2b43a8c0fb934"
Unverified Commit 5326460f authored by Nicolas Patry's avatar Nicolas Patry Committed by GitHub
Browse files

Enabling live `automatic-speech-recognition` asr for Whisper. (#21196)

* Enabling live `automatic-speech-recognition` asr for Whisper.

* Dummy change.
parent 1b37fb5e
...@@ -512,8 +512,8 @@ class AutomaticSpeechRecognitionPipeline(ChunkPipeline): ...@@ -512,8 +512,8 @@ class AutomaticSpeechRecognitionPipeline(ChunkPipeline):
if self.torch_dtype is not None: if self.torch_dtype is not None:
processed = processed.to(dtype=self.torch_dtype) processed = processed.to(dtype=self.torch_dtype)
if stride is not None: if stride is not None:
if self.model.__class__ in MODEL_FOR_SPEECH_SEQ_2_SEQ_MAPPING.values(): if self.type == "seq2seq":
raise ValueError("Stride is only usable with CTC models, try removing it") raise ValueError("Stride is only usable with CTC models, try removing it !")
processed["stride"] = stride processed["stride"] = stride
yield {"is_last": True, **processed, **extra} yield {"is_last": True, **processed, **extra}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment