Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

- support whisper --local_files_only to skip check huggingface model #31

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions wyoming_faster_whisper/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,10 @@ async def main() -> None:
"--initial-prompt",
help="Optional text to provide as a prompt for the first window",
)
parser.add_argument(
"--local_files_only",
help="faster-whisper: If True, avoid downloading the file and return the path to the local cached file if it exists."
)
#
parser.add_argument("--debug", action="store_true", help="Log DEBUG messages")
parser.add_argument(
Expand Down Expand Up @@ -90,6 +94,9 @@ async def main() -> None:
if args.language == "auto":
# Whisper does not understand "auto"
args.language = None

if not args.local_files_only:
args.local_files_only = False

wyoming_info = Info(
asr=[
Expand Down Expand Up @@ -124,6 +131,7 @@ async def main() -> None:
whisper_model = faster_whisper.WhisperModel(
args.model,
download_root=args.download_dir,
local_files_only=args.local_files_only,
device=args.device,
compute_type=args.compute_type,
)
Expand Down