mirror of
https://github.com/remsky/Kokoro-FastAPI.git
synced 2025-08-05 16:48:53 +00:00
Fix low quality because audio was being encoded at a lower bitrate
This commit is contained in:
parent
7d73c3c7ee
commit
980bc5b4a8
1 changed files with 1 additions and 0 deletions
|
@ -28,6 +28,7 @@ class StreamingAudioWriter:
|
|||
self.container = av.open(self.output_buffer, mode="w", format=self.format)
|
||||
#print(av.codecs_available)
|
||||
self.stream = self.container.add_stream(codec_map[self.format], rate=self.sample_rate,sample_rate=self.sample_rate,layout='mono' if self.channels == 1 else 'stereo')
|
||||
self.stream.bit_rate = 96000
|
||||
else:
|
||||
raise ValueError(f"Unsupported format: {format}")
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue