audio increase
Browse files- src/video_renderer.py +6 -0
src/video_renderer.py
CHANGED
|
@@ -862,8 +862,14 @@ class VideoRenderer:
|
|
| 862 |
"""
|
| 863 |
Dynamically calculate background music volume based on TTS and background RMS.
|
| 864 |
Tuned for boosted TTS (+5 dB from Google TTS).
|
|
|
|
| 865 |
"""
|
| 866 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 867 |
# Base volume curve (a bit higher overall)
|
| 868 |
if main_rms > 0.04: # Very strong TTS
|
| 869 |
base_volume = 0.35
|
|
|
|
| 862 |
"""
|
| 863 |
Dynamically calculate background music volume based on TTS and background RMS.
|
| 864 |
Tuned for boosted TTS (+5 dB from Google TTS).
|
| 865 |
+
If main_rms is 0 (no TTS), treat background as main audio with high volume.
|
| 866 |
"""
|
| 867 |
|
| 868 |
+
# If no main audio (TTS), treat background as primary audio
|
| 869 |
+
if main_rms == 0 or main_rms < 0.001:
|
| 870 |
+
logger.info("🔊 No main audio detected, treating background as primary audio with high volume")
|
| 871 |
+
return 0.85 # High volume for background as main audio
|
| 872 |
+
|
| 873 |
# Base volume curve (a bit higher overall)
|
| 874 |
if main_rms > 0.04: # Very strong TTS
|
| 875 |
base_volume = 0.35
|