diff dictation/transcriber.py @ 282:6bd4a3990696 default tip

Add cross-platform canvas orchestration and typed composer Enable native ARM dependencies, macOS Copilot orchestration, portable service supervision, CPU dictation, and a shared N-key speak-or-type composer. Co-authored-by: Copilot <[email protected]> Copilot-Session: f68442b1-fa8f-46a0-9689-81710613bbd4
author MrJuneJune <me@mrjunejune.com>
date Thu, 20 Aug 2026 20:45:25 -0700
parents 49e9e591c9bb
children
line wrap: on
line diff
--- a/dictation/transcriber.py	Tue Aug 18 22:18:15 2026 -0700
+++ b/dictation/transcriber.py	Thu Aug 20 20:45:25 2026 -0700
@@ -30,8 +30,14 @@
 
 
 class FasterWhisperTranscriber:
-    def __init__(self, model_dir: Path, compute_type: str) -> None:
+    def __init__(
+        self,
+        model_dir: Path,
+        device: str,
+        compute_type: str,
+    ) -> None:
         self._model_dir = model_dir
+        self._device = device
         self._compute_type = compute_type
         self._executor = ThreadPoolExecutor(
             max_workers=1,
@@ -62,7 +68,7 @@
             )
         model = WhisperModel(
             str(self._model_dir),
-            device="cuda",
+            device=self._device,
             compute_type=self._compute_type,
             local_files_only=True,
         )