Skip to content

Fix typo in SinusoidalPositionEncoder.__init__ and remove hardcoded path#283

Open
AwkCode wants to merge 1 commit intoFunAudioLLM:mainfrom
AwkCode:fix/typo-and-hardcoded-path
Open

Fix typo in SinusoidalPositionEncoder.__init__ and remove hardcoded path#283
AwkCode wants to merge 1 commit intoFunAudioLLM:mainfrom
AwkCode:fix/typo-and-hardcoded-path

Conversation

@AwkCode
Copy link

@AwkCode AwkCode commented Mar 2, 2026

Summary

  • model.py: Fix __int____init__ typo in SinusoidalPositionEncoder constructor (line 21). The method name __int__ is a valid Python dunder for integer conversion, so this silently fails to act as the class constructor.
  • export.py: Replace hardcoded local file path (/Users/shixian/Downloads/asr_example_hotword.wav) with a portable path using os.path.join(model_path, "example", "en.mp3"), which references the example audio already bundled with the model.

Test plan

  • Verified both changes are minimal and isolated
  • The SinusoidalPositionEncoder currently works because encode() and forward() don't depend on instance variables set in __init__, but fixing the typo ensures correct behavior if the constructor is extended in the future
  • The export.py path now uses the model's own example audio, which is guaranteed to exist after model download

🤖 Generated with Claude Code

…ath in export.py

- 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 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant