Skip to content

Commit

Permalink
Merge pull request #162 from rominf/rominf-fix-models.yml-loading
Browse files Browse the repository at this point in the history
Fix models.yml loading
  • Loading branch information
snakers4 committed Jun 12, 2022
2 parents 2b02d83 + 47732b0 commit 8d25ae8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/silero/silero.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def silero_stt(language='en',
split_into_batches,
prepare_model_input)

models_list_file = os.path.join(os.path.dirname(__file__), "models.yml")
models_list_file = os.path.join(os.path.dirname(__file__), "..", "..", "models.yml")
if not os.path.exists(models_list_file):
models_list_file = 'latest_silero_models.yml'
if not os.path.exists(models_list_file):
Expand Down Expand Up @@ -52,7 +52,7 @@ def silero_tts(language='en',
from .tts_utils import apply_tts
from .tts_utils import init_jit_model as init_jit_model_tts

models_list_file = os.path.join(os.path.dirname(__file__), "models.yml")
models_list_file = os.path.join(os.path.dirname(__file__), "..", "..", "models.yml")
if not os.path.exists(models_list_file):
models_list_file = 'latest_silero_models.yml'
if not os.path.exists(models_list_file):
Expand Down Expand Up @@ -109,7 +109,7 @@ def silero_te():
import yaml
from torch import package

models_list_file = os.path.join(os.path.dirname(__file__), "models.yml")
models_list_file = os.path.join(os.path.dirname(__file__), "..", "..", "models.yml")
if not os.path.exists(models_list_file):
models_list_file = 'latest_silero_models.yml'
if not os.path.exists(models_list_file):
Expand Down

0 comments on commit 8d25ae8

Please sign in to comment.