From 6d2557b319cdb023eb2df9f9e3a612547eacbdd5 Mon Sep 17 00:00:00 2001 From: Daniel weadock Date: Mon, 2 Mar 2026 00:01:59 -0500 Subject: [PATCH] Fix typo in SinusoidalPositionEncoder.__init__ and remove hardcoded path in export.py MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - model.py: Fix `__int__` → `__init__` typo in SinusoidalPositionEncoder constructor - export.py: Replace hardcoded local path with portable os.path.join using model_path Co-Authored-By: Claude Opus 4.6 --- export.py | 2 +- model.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/export.py b/export.py index 8df151b..0f05e62 100644 --- a/export.py +++ b/export.py @@ -40,7 +40,7 @@ tokenizer = None # inference -wav_or_scp = "/Users/shixian/Downloads/asr_example_hotword.wav" +wav_or_scp = os.path.join(model_path, "example", "en.mp3") language_list = [0] textnorm_list = [15] res = model_bin(wav_or_scp, language_list, textnorm_list, tokenizer=tokenizer) diff --git a/model.py b/model.py index 53adb25..b32b931 100644 --- a/model.py +++ b/model.py @@ -18,7 +18,7 @@ class SinusoidalPositionEncoder(torch.nn.Module): """ """ - def __int__(self, d_model=80, dropout_rate=0.1): + def __init__(self, d_model=80, dropout_rate=0.1): pass def encode(