Initialize AI processor during daemon startup
This commit is contained in:
parent
09090102a2
commit
85873d739f
3 changed files with 38 additions and 25 deletions
|
|
@ -70,7 +70,9 @@ class Daemon:
|
|||
cfg.stt.model,
|
||||
cfg.stt.device,
|
||||
)
|
||||
self.ai_processor: LlamaProcessor | None = None
|
||||
logging.info("initializing ai processor")
|
||||
self.ai_processor = LlamaProcessor(verbose=self.verbose)
|
||||
logging.info("ai processor ready")
|
||||
self.log_transcript = verbose
|
||||
self.vocabulary = VocabularyEngine(cfg.vocabulary, cfg.domain_inference)
|
||||
self._stt_hint_kwargs_cache: dict[str, Any] | None = None
|
||||
|
|
@ -282,7 +284,7 @@ class Daemon:
|
|||
|
||||
def _get_ai_processor(self) -> LlamaProcessor:
|
||||
if self.ai_processor is None:
|
||||
self.ai_processor = LlamaProcessor(verbose=self.verbose)
|
||||
raise RuntimeError("ai processor is not initialized")
|
||||
return self.ai_processor
|
||||
|
||||
def _stt_hint_kwargs(self) -> dict[str, Any]:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue