-
Notifications
You must be signed in to change notification settings - Fork 0
Let's try aac #61
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
base: base-sha/885b37fc74790e45907c6e4d63240aa4a4aa758b
Are you sure you want to change the base?
Let's try aac #61
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||
---|---|---|---|---|---|---|---|---|
|
@@ -224,7 +224,7 @@ def audio_notification(audiofile, apobj, body, title): | |||||||
Examples: | ||||||||
audio_notification(audiofile, apobj, body, title) | ||||||||
""" | ||||||||
opusfile = Path(audiofile).with_suffix(".opus") | ||||||||
aacfile = Path(audiofile).with_suffix(".m4a") | ||||||||
ffmpeg_cmd = [ | ||||||||
"ffmpeg", | ||||||||
"-y", | ||||||||
|
@@ -233,25 +233,21 @@ def audio_notification(audiofile, apobj, body, title): | |||||||
"-filter:a", | ||||||||
"loudnorm=i=-14", | ||||||||
"-c:a", | ||||||||
"libopus", | ||||||||
"-application", | ||||||||
"voip", | ||||||||
"-cutoff", | ||||||||
"aac", | ||||||||
"-b", | ||||||||
"8000", | ||||||||
"-vbr", | ||||||||
"on", | ||||||||
opusfile, | ||||||||
aacfile, | ||||||||
] | ||||||||
subprocess.run(ffmpeg_cmd, check=True, capture_output=True) | ||||||||
|
||||||||
opusfile = str(opusfile) | ||||||||
aacfile = str(aacfile) | ||||||||
apobj.notify( | ||||||||
body=body, | ||||||||
title=title, | ||||||||
attach=opusfile, | ||||||||
attach=aacfile, | ||||||||
) | ||||||||
# Remove opusfile; audiofile and json unlinked later | ||||||||
Path.unlink(opusfile) | ||||||||
# Remove aacfile; audiofile and json unlinked later | ||||||||
Path.unlink(aacfile) | ||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. suggestion (code_refinement): Use safer file deletion method to prevent potential data loss. Consider checking if the file exists before attempting to unlink it to avoid raising an unnecessary exception.
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this comment correct? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this comment helpful? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is the comment type correct? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is the comment area correct? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should this comment become an LLM test? |
||||||||
|
||||||||
|
||||||||
def import_notification_destinations(): | ||||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
issue (performance): Review the AAC encoding parameters for correctness.
The bitrate '8000' seems unusually low for AAC audio, which might affect audio quality. Verify if this meets the intended quality requirements.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this comment correct?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this comment helpful?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the comment type correct?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the comment area correct?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this comment become an LLM test?