Spaces:
Runtime error
Runtime error
deploy live demo
Browse files
pipeline/assemble.py
CHANGED
|
@@ -38,7 +38,8 @@ ISLAND_MS = 100 # drop isolated voiced blips shorter than this
|
|
| 38 |
TAIL_GAP_S = 0.60 # a trailing segment after a gap > this may be junk…
|
| 39 |
TAIL_KEEP_S = 1.5 # …unless the trailing voiced run reaches this length
|
| 40 |
PAD_START_S = 0.04
|
| 41 |
-
PAD_END_S = 0.
|
|
|
|
| 42 |
SANITY_FLOOR_S = 1.0 # if the speech window is shorter, keep the whole clip
|
| 43 |
|
| 44 |
TARGET_W, TARGET_H = 720, 1280 # 9:16 @ 720p — every clip normalized to this so the
|
|
|
|
| 38 |
TAIL_GAP_S = 0.60 # a trailing segment after a gap > this may be junk…
|
| 39 |
TAIL_KEEP_S = 1.5 # …unless the trailing voiced run reaches this length
|
| 40 |
PAD_START_S = 0.04
|
| 41 |
+
PAD_END_S = 0.18 # trailing silence kept after speech → a small gap before the next
|
| 42 |
+
# clip's speech, so cuts aren't too tight (owner: +~0.1s margin)
|
| 43 |
SANITY_FLOOR_S = 1.0 # if the speech window is shorter, keep the whole clip
|
| 44 |
|
| 45 |
TARGET_W, TARGET_H = 720, 1280 # 9:16 @ 720p — every clip normalized to this so the
|
pipeline/webapp/templates/video.html
CHANGED
|
@@ -119,10 +119,12 @@
|
|
| 119 |
</div>
|
| 120 |
|
| 121 |
<script>
|
| 122 |
-
const STAGE={{ stage|tojson }}, VID={{ video.id|tojson }};
|
| 123 |
if(["generating_hooks","generating_body","assembling"].includes(STAGE)){
|
| 124 |
setInterval(async()=>{try{const d=await(await fetch(`/videos/${VID}/status`)).json();
|
| 125 |
-
|
|
|
|
|
|
|
| 126 |
}
|
| 127 |
</script>
|
| 128 |
{% endblock %}
|
|
|
|
| 119 |
</div>
|
| 120 |
|
| 121 |
<script>
|
| 122 |
+
const STAGE={{ stage|tojson }}, VID={{ video.id|tojson }}, DONE={{ progress.done }};
|
| 123 |
if(["generating_hooks","generating_body","assembling"].includes(STAGE)){
|
| 124 |
setInterval(async()=>{try{const d=await(await fetch(`/videos/${VID}/status`)).json();
|
| 125 |
+
// reload on a stage change OR when another clip finishes (live progress)
|
| 126 |
+
if(d.stage!==STAGE || (d.progress && d.progress.done!==DONE)) location.reload();
|
| 127 |
+
}catch(e){}},2000);
|
| 128 |
}
|
| 129 |
</script>
|
| 130 |
{% endblock %}
|