Skip to content

Commit

Permalink
Add shell=True in subprocess call in _load_audio (#143)
Browse files Browse the repository at this point in the history
Prevents FileNotFoundError thrown when running subprocess and yt-dlp is present
  • Loading branch information
jerome-labonte-udem authored Apr 27, 2023
1 parent 1eabb37 commit a8df3b5
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions stable_whisper/audio.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ def _load_file(file: Union[str, bytes], verbose: bool = False):
verbosity = ' -q' if verbose is None else (' --progress' if verbose else ' --progress -q')
p = subprocess.run(
f'yt-dlp "{file}" -f ba/w -I 1{verbosity} -o -',
shell=True,
stdout=subprocess.PIPE
)
if len(p.stdout) == 0:
Expand Down

0 comments on commit a8df3b5

Please sign in to comment.