Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix models.yml loading #162

Merged
merged 1 commit into from
Jun 12, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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