Skip to content

Commit

Permalink
Merge pull request #199 from thomasmol/v3
Browse files Browse the repository at this point in the history
  • Loading branch information
m-bain authored Apr 29, 2023
2 parents cc7e168 + cb176a1 commit a903e57
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions whisperx/asr.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ def stack(items):
return final_iterator

def transcribe(
self, audio: Union[str, np.ndarray], batch_size=None
self, audio: Union[str, np.ndarray], batch_size=None, num_workers=0
):
if isinstance(audio, str):
audio = load_audio(audio)
Expand All @@ -232,7 +232,7 @@ def data(audio, segments):

segments = []
batch_size = batch_size or self._batch_size
for idx, out in enumerate(self.__call__(data(audio, vad_segments), batch_size=batch_size)):
for idx, out in enumerate(self.__call__(data(audio, vad_segments), batch_size=batch_size, num_workers=num_workers)):
text = out['text']
if batch_size in [0, 1, None]:
text = text[0]
Expand Down

0 comments on commit a903e57

Please sign in to comment.