Skip to content

Commit

Permalink
fix: enhance log for funasr
Browse files Browse the repository at this point in the history
  • Loading branch information
aiwantaozi committed Nov 27, 2024
1 parent 5d8237d commit ac748d3
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions vox_box/backends/stt/funasr.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ def __init__(
self._cfg = cfg
self._model = None
self._model_dict = {}
self._log_level = "INFO"
if self._cfg.debug:
self._log_level = "DEBUG"

self._configuration_json = None
self._config_json = None
Expand All @@ -40,15 +43,11 @@ def load(self):
if self.model_load:
return self

log_level = "INFO"
if self._cfg.debug:
log_level = "DEBUG"

self._model = AutoModel(
model=self._cfg.model,
device=self._cfg.device,
model_path=self._cfg.model,
log_level=log_level,
log_level=self._log_level,
disable_update=True,
)
self._model_dict = create_model_dict(
Expand Down Expand Up @@ -101,6 +100,7 @@ def transcribe(
prompt=prompt,
temperature=temperature,
use_itn=True,
log_level=self._log_level,
**kwargs
)

Expand Down

0 comments on commit ac748d3

Please sign in to comment.