mirror of
https://github.com/R0m1k3/Socialflow.git
synced 2026-10-21 22:18:12 +02:00
fix cam to 4k et ffmpeg TTS
This commit is contained in:
1 parent
77a6dd7188
commit
074de54c8b
5 files changed
+90
-25
No files matched your search
@@ -60,7 +60,7 @@ async def generate_tts_with_subs(
|
||||
submaker.feed(chunk)
|
||||
|
||||
with open(vtt_path, "w", encoding="utf-8") as file:
|
||||
file.write(submaker.generate_subs())
|
||||
file.write(submaker.get_subs())
|
||||
|
||||
|
||||
class ReelResponse(BaseModel):
|
||||
@@ -228,11 +228,8 @@ async def process_reel(request: ReelRequest, x_api_key: str = Header(None)):
|
||||
cmd.extend(["-i", str(tts_audio_path)])
|
||||
|
||||
# Prepare inputs for mixing
|
||||
if has_original_audio:
|
||||
# Original audio usually needs to be lowered if there is music/voice
|
||||
vol = 0.6 if (has_music or has_tts) else 1.0
|
||||
filter_complex_parts.append(f"[0:a]volume={vol}[a0]")
|
||||
mix_inputs += 1
|
||||
# ALWAYS ignore original video audio - only use music and/or TTS
|
||||
# (Original audio is never used per user request)
|
||||
|
||||
if has_music:
|
||||
# Music volume
|
||||
@@ -249,8 +246,7 @@ async def process_reel(request: ReelRequest, x_api_key: str = Header(None)):
|
||||
# Build mix command
|
||||
if mix_inputs > 0:
|
||||
inputs_str = ""
|
||||
if has_original_audio:
|
||||
inputs_str += "[a0]"
|
||||
# Note: Original audio is never mixed in (always muted)
|
||||
if has_music:
|
||||
inputs_str += "[a1]"
|
||||
if has_tts:
|
||||
|
||||
@@ -3,6 +3,5 @@ uvicorn==0.27.0
|
||||
python-multipart==0.0.6
|
||||
requests==2.31.0
|
||||
pydantic==2.6.0
|
||||
pydantic==2.6.0
|
||||
edge-tts
|
||||
emoji
|
||||
Reference in new issue
Block a user