further adjustments to updating the voice extension for audio quality

This commit is contained in:
jenz 2025-10-13 23:37:32 +02:00
parent bcaba4ce49
commit a14a543aee
2 changed files with 5 additions and 3 deletions

View File

@ -61,9 +61,11 @@ class FFmpegAudioPlayer():
backwards = None, *args):
if position:
PosStr = str(datetime.timedelta(seconds = position))
Command = ["/usr/bin/ffmpeg", "-ss", PosStr, "-i", uri, "-acodec", "pcm_s16le", "-ac", "1", "-ar", str(int(self.SampleRate)), "-f", "s16le", "-vn", *args]
#Command = ["/usr/bin/ffmpeg", "-ss", PosStr, "-i", uri, "-acodec", "pcm_s16le", "-ac", "1", "-ar", str(int(self.SampleRate)), "-f", "s16le", "-vn", *args]
Command = ["/usr/bin/ffmpeg", "-ss", PosStr, "-i", uri, "-af", "highpass=f=20,aresample=resampler=soxr:precision=28", "-acodec", "pcm_s16le", "-ac", "1", "-ar", str(int(self.SampleRate)), "-f", "s16le", "-vn", *args]
else:
Command = ["/usr/bin/ffmpeg", "-i", uri, "-acodec", "pcm_s16le", "-ac", "1", "-ar", str(int(self.SampleRate)), "-f", "s16le", "-vn", *args]
#Command = ["/usr/bin/ffmpeg", "-i", uri, "-acodec", "pcm_s16le", "-ac", "1", "-ar", str(int(self.SampleRate)), "-f", "s16le", "-vn", *args]
Command = ["/usr/bin/ffmpeg", "-i", uri, "-af", "highpass=f=20,aresample=resampler=soxr:precision=28", "-acodec", "pcm_s16le", "-ac", "1", "-ar", str(int(self.SampleRate)),"-f", "s16le", "-vn"]
self.Playing = True
if dec_params:

View File

@ -3,7 +3,7 @@
{
"Host": "127.0.0.1",
"Port": 28015,
"SampleRate": 22050
"SampleRate": 48000
},
"SMAPIServer":
{