Skip to content

Fix OPUS encoding bitrate: 24kbps → 128kbps#170

Open
easilyBaffled wants to merge 1 commit into
denizsafak:mainfrom
easilyBaffled:fix/opus-bitrate
Open

Fix OPUS encoding bitrate: 24kbps → 128kbps#170
easilyBaffled wants to merge 1 commit into
denizsafak:mainfrom
easilyBaffled:fix/opus-bitrate

Conversation

@easilyBaffled

Copy link
Copy Markdown

Summary

  • OPUS audio bitrate was set to 24000 (24kbps) in all ffmpeg encoding calls — this appears to confuse the audio sample rate (24000 Hz) with the target bitrate
  • Result: extremely low quality, muffled/robotic audio when outputting OPUS format
  • Fix: changed to 128000 (128kbps), appropriate for speech/audiobook content

Files changed

  • abogen/pyqt/conversion.py — 3 occurrences (merged output, chapter output, subtitle file output)
  • abogen/webui/conversion_runner.py — 1 occurrence

Test plan

  • Generate OPUS audio via desktop GUI — verify clear output at 128kbps
  • Generate OPUS audio via web UI — verify same
  • Confirm file sizes are reasonable (~1MB/min for speech at 128kbps)

🤖 Generated with Claude Code

The OPUS bitrate was set to 24000 (24kbps), which appears to confuse
the audio sample rate (24000 Hz) with the target bitrate. This resulted
in extremely low quality, muffled audio output when using OPUS format.

Changed to 128000 (128kbps) which is appropriate for speech/audiobook
content and produces clear, natural-sounding output.

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant