Force ogg

This commit is contained in:
Nexus 2023-11-12 16:54:06 +00:00 committed by GitHub
parent 9b0de27890
commit 004542c69b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -347,7 +347,7 @@ class VoiceCog(commands.Cog):
with tempfile.TemporaryDirectory("jimmy-audio-boost-") as temp_dir_raw: with tempfile.TemporaryDirectory("jimmy-audio-boost-") as temp_dir_raw:
temp_dir = Path(temp_dir_raw).resolve() temp_dir = Path(temp_dir_raw).resolve()
_input = temp_dir / file.filename _input = temp_dir / file.filename
output = _input.with_name(_input.name + "-processed" + ".".join(_input.suffixes)) output = _input.with_name(_input.name + "-processed.ogg")
await file.save(_input) await file.save(_input)
proc: subprocess.CompletedProcess = await self.bot.loop.run_in_executor( proc: subprocess.CompletedProcess = await self.bot.loop.run_in_executor(
@ -359,6 +359,7 @@ class VoiceCog(commands.Cog):
"-hide_banner", "-hide_banner",
"-i", "-i",
str(_input), str(_input),
"-c:a libopus",
"-b:a", "-b:a",
"64k", "64k",
"-af", "-af",