mirror of
https://github.com/remsky/Kokoro-FastAPI.git
synced 2025-04-13 09:39:17 +00:00
fix: bump up audio quality settings in StreamingAudioWriter
Some checks are pending
CI / test (3.10) (push) Waiting to run
Some checks are pending
CI / test (3.10) (push) Waiting to run
This commit is contained in:
parent
37ea01eaf9
commit
cfae7db7fc
1 changed files with 4 additions and 4 deletions
|
@ -112,7 +112,7 @@ class StreamingAudioWriter:
|
||||||
parameters.extend(
|
parameters.extend(
|
||||||
[
|
[
|
||||||
"-q:a",
|
"-q:a",
|
||||||
"2",
|
"0", # Highest quality
|
||||||
"-write_xing",
|
"-write_xing",
|
||||||
"1", # XING header for MP3
|
"1", # XING header for MP3
|
||||||
"-id3v1",
|
"-id3v1",
|
||||||
|
@ -142,7 +142,7 @@ class StreamingAudioWriter:
|
||||||
self.encoder.export(
|
self.encoder.export(
|
||||||
output_buffer,
|
output_buffer,
|
||||||
**format_args,
|
**format_args,
|
||||||
bitrate="192k",
|
bitrate="192k", # Optimal for 24kHz/16-bit mono source
|
||||||
parameters=parameters,
|
parameters=parameters,
|
||||||
)
|
)
|
||||||
self.encoder = None
|
self.encoder = None
|
||||||
|
@ -189,10 +189,10 @@ class StreamingAudioWriter:
|
||||||
self.encoder.export(
|
self.encoder.export(
|
||||||
output_buffer,
|
output_buffer,
|
||||||
**format_args,
|
**format_args,
|
||||||
bitrate="192k",
|
bitrate="192k", # Optimal for 24kHz/16-bit mono source
|
||||||
parameters=[
|
parameters=[
|
||||||
"-q:a",
|
"-q:a",
|
||||||
"2",
|
"0", # Highest quality for chunks too
|
||||||
"-write_xing",
|
"-write_xing",
|
||||||
"0", # No XING headers for chunks
|
"0", # No XING headers for chunks
|
||||||
],
|
],
|
||||||
|
|
Loading…
Add table
Reference in a new issue