diff --git a/hns/cli.py b/hns/cli.py index 479ee75..f963cac 100644 --- a/hns/cli.py +++ b/hns/cli.py @@ -10,7 +10,6 @@ import numpy as np import pyperclip import sounddevice as sd -from faster_whisper import WhisperModel from rich.console import Console from rich.progress import Progress, SpinnerColumn, TextColumn, TimeElapsedColumn @@ -187,7 +186,9 @@ def _get_model_name(self, model_name: Optional[str]) -> str: return model - def _load_model(self) -> WhisperModel: + def _load_model(self): + from faster_whisper import WhisperModel + try: return WhisperModel(self.model_name, device="cpu", compute_type="int8") except Exception as e: diff --git a/pyproject.toml b/pyproject.toml index 50292f9..0bd8044 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "hns" -version = "1.0.5" +version = "1.0.6" description = "A simple, privacy-focused speech-to-text CLI tool" readme = "README.md" requires-python = ">=3.10" diff --git a/uv.lock b/uv.lock index 2ce1255..1579e18 100644 --- a/uv.lock +++ b/uv.lock @@ -304,7 +304,7 @@ wheels = [ [[package]] name = "hns" -version = "1.0.5" +version = "1.0.6" source = { editable = "." } dependencies = [ { name = "click" },