mirror of
https://github.com/R0m1k3/Socialflow.git
synced 2026-10-11 17:26:45 +02:00
fix: reduce font size to 16, improve TTS sync (3 words/chunk, 0.3s/word)
This commit is contained in:
1 parent
3ce30e71f0
commit
fe638b9895
3 files changed
+6
-6
No files matched your search
@@ -117,7 +117,7 @@ def generate_simple_vtt(text: str, vtt_path: Path):
|
||||
|
||||
for word in words:
|
||||
current_chunk.append(word)
|
||||
if len(current_chunk) >= 5 or word.endswith((".", "!", "?", ":")):
|
||||
if len(current_chunk) >= 3 or word.endswith((".", "!", "?", ":")):
|
||||
chunks.append(" ".join(current_chunk))
|
||||
current_chunk = []
|
||||
|
||||
@@ -131,7 +131,7 @@ def generate_simple_vtt(text: str, vtt_path: Path):
|
||||
|
||||
for i, chunk in enumerate(chunks):
|
||||
word_count = len(chunk.split())
|
||||
duration = word_count * 0.4 # 0.4 seconds per word
|
||||
duration = word_count * 0.3 # 0.3 seconds per word (faster sync)
|
||||
|
||||
start_time = format_vtt_time(current_time)
|
||||
end_time = format_vtt_time(current_time + duration)
|
||||
|
||||
Reference in new issue
Block a user