Add some info and debug logs (#113)

This commit is contained in:
Guillaume Klein
2023-04-05 16:57:59 +02:00
committed by GitHub
parent 746f2698db
commit 051b3350e5
2 changed files with 70 additions and 9 deletions

View File

@@ -1,3 +1,4 @@
import logging
import os
from typing import Optional
@@ -25,6 +26,11 @@ def get_assets_path():
return os.path.join(os.path.dirname(os.path.abspath(__file__)), "assets")
def get_logger():
"""Returns the module logger."""
return logging.getLogger("faster_whisper")
def download_model(size: str, output_dir: Optional[str] = None):
"""Downloads a CTranslate2 Whisper model from the Hugging Face Hub.