Skip to content

Move to flac #68

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

Open
wants to merge 1 commit into
base: base-sha/a5336ef9e38cf2b71edeb9cc6b0012fb56d6087d
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 7 additions & 13 deletions ttt.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ def audio_notification(audiofile, apobj, body, title):
Examples:
audio_notification(audiofile, apobj, body, title)
"""
opusfile = Path(audiofile).with_suffix(".opus")
flacfile = Path(audiofile).with_suffix(".flac")
ffmpeg_cmd = [
"ffmpeg",
"-y",
Expand All @@ -233,25 +233,19 @@ def audio_notification(audiofile, apobj, body, title):
"-filter:a",
"loudnorm=i=-14",
"-c:a",
"libopus",
"-application",
"voip",
"-cutoff",
"8000",
"-vbr",
"on",
opusfile,
"flac",
flacfile,
Comment on lines +236 to +237

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

issue (performance): Review the removal of specific audio codec options.

The removal of specific codec options like 'application', 'cutoff', 'vbr' might affect the audio quality or the intended use of the audio file. Please ensure this change aligns with the audio quality requirements.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this comment correct?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this comment helpful?

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?

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?

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?

]
subprocess.run(ffmpeg_cmd, check=True, capture_output=True)

opusfile = str(opusfile)
flacfile = str(flacfile)
apobj.notify(
body=body,
title=title,
attach=opusfile,
attach=flacfile,
)
# Remove opusfile; audiofile and json unlinked later
Path.unlink(opusfile)
# Remove flacfile; audiofile and json unlinked later
Path.unlink(flacfile)


def import_notification_destinations():
Expand Down