diff options
| author | historia <historiavg@proton.me> | 2026-08-18 03:00:16 -0400 |
|---|---|---|
| committer | historia <historiavg@proton.me> | 2026-08-18 03:00:16 -0400 |
| commit | de5b2d9ca7302ade711d9dfb32b2fe8047f55cc2 (patch) | |
| tree | 410f9a0ffd996d2ac14843e8f78947c36ff12d43 /converter/audio.py | |
| parent | 6d0e740b4225859457109821a4c77feff72c24b5 (diff) | |
| download | tts-audiobook-generator-de5b2d9ca7302ade711d9dfb32b2fe8047f55cc2.tar.gz | |
feat: support .ogg and .flac output
Diffstat (limited to 'converter/audio.py')
| -rw-r--r-- | converter/audio.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/converter/audio.py b/converter/audio.py index 5a7ec35..98864f6 100644 --- a/converter/audio.py +++ b/converter/audio.py @@ -52,6 +52,10 @@ def _encode_args(output_format: str) -> List[str]: """Return ffmpeg output codec/bitrate args for the requested container.""" if output_format == "m4b": return ["-c:a", "aac", "-b:a", config.AUDIO_BITRATE] + if output_format == "ogg": + return ["-c:a", "libvorbis", "-b:a", config.AUDIO_BITRATE] + if output_format == "flac": + return ["-c:a", "flac"] if output_format == "wav": # Lossless intermediate for per-chapter scratch audio; avoids # generational loss when the final m4b re-encodes to AAC. |
