Skip to content

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

Closed
AwkCode wants to merge 1 commit into
FunAudioLLM:mainfrom
AwkCode:fix/typo-and-hardcoded-path
Closed

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

Conversation

@AwkCode
Copy link
Copy Markdown

@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>
LauraGPT added a commit that referenced this pull request May 19, 2026
@LauraGPT
Copy link
Copy Markdown
Member

Thanks! The init typo was merged via #281, and the hardcoded path fix has been applied separately (commit 1efbd27). Closing.

@LauraGPT LauraGPT closed this May 19, 2026
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.

2 participants