Skip to content

Commit

Permalink
fix whisper environment now that it's been isolated
Browse files Browse the repository at this point in the history
  • Loading branch information
zackees committed Jan 11, 2024
1 parent b2b1a57 commit 968bdb5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion transcribe_anything/parse_whisper_options.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
from typing import Any

from transcribe_anything import logger
from transcribe_anything.whisper import get_environment

PATTERN = r"\s+\[--(.*?)\]"

Expand All @@ -24,9 +25,10 @@ def _parse_item(item: str) -> tuple[str, Any]:

def parse_whisper_options() -> dict:
"""Parses the whisper options."""
env = get_environment().environment()
stdout = subprocess.check_output(
"whisper --help", shell=True, universal_newlines=True,
encoding="utf-8"
encoding="utf-8", env=env
)
lines = stdout.splitlines()
data = {}
Expand Down

0 comments on commit 968bdb5

Please sign in to comment.