Fix typo in SinusoidalPositionEncoder.__init__ and remove hardcoded path#283
Open
AwkCode wants to merge 1 commit intoFunAudioLLM:mainfrom
Open
Fix typo in SinusoidalPositionEncoder.__init__ and remove hardcoded path#283AwkCode wants to merge 1 commit intoFunAudioLLM:mainfrom
AwkCode wants to merge 1 commit intoFunAudioLLM:mainfrom
Conversation
…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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
__int__→__init__typo inSinusoidalPositionEncoderconstructor (line 21). The method name__int__is a valid Python dunder for integer conversion, so this silently fails to act as the class constructor./Users/shixian/Downloads/asr_example_hotword.wav) with a portable path usingos.path.join(model_path, "example", "en.mp3"), which references the example audio already bundled with the model.Test plan
SinusoidalPositionEncodercurrently works becauseencode()andforward()don't depend on instance variables set in__init__, but fixing the typo ensures correct behavior if the constructor is extended in the futureexport.pypath now uses the model's own example audio, which is guaranteed to exist after model download🤖 Generated with Claude Code