Skip to content

Make videos on the computer you already own. FreeVideo runs MiniMax H3 in as little as 8 GB of VRAM and 16 GB of RAM, and adapts its acceleration path to your hardware.

Voice lines: offer the dubbing model download in the editor, one download for the dubbing and...

Bowen Xueac70c1e5d421
diff --git a/freevideo_engine/agent/errors.py b/freevideo_engine/agent/errors.py
index fd04e5f..491a374 100644
--- a/freevideo_engine/agent/errors.py
+++ b/freevideo_engine/agent/errors.py
@@ -115,6 +115,8 @@ ERRORS.update({
'export_failed': (409, True, 'The export did not finish.', 'Read the project, then submit the export again with a new ref.'),
'no_speech_model': (409, False, 'No speech model is installed on this machine.',
'Do not retry. Write the subtitle lines yourself with the subtitles edit, or tell the user the model is not installed.'),
+ 'speech_language': (409, False, 'The speech model does not cover the language of this sound.',
+ 'Do not retry; tell the user the language is not supported, or write the lines yourself.'),
'listen_failed': (409, True, 'Listening to the sound did not finish.',
'Read the project, then submit the listening job again with a new ref; if it fails again, write the lines yourself.'),
'music_download_failed': (409, True, 'The music model could not be downloaded.',
diff --git a/freevideo_engine/agent/guide.py b/freevideo_engine/agent/guide.py
index a9966e9..c96e0d8 100644
--- a/freevideo_engine/agent/guide.py
+++ b/freevideo_engine/agent/guide.py
@@ -148,7 +148,7 @@ GUIDE = {
'Music: POST /projects/{id}/music with the revision you read and a caption; wait for the job, then read the project: result.clip_ids are the new clips on a2. Run it after the cut is joined; a second run needs the earlier score removed from a2.',
'Split sound: POST /projects/{id}/stems with the revision you read and the clip_id of a sound clip; wait for the job. The clip\'s sound is split into dialogue, music and ambience on tracks a4, a5 and a6 over the clip\'s range, and the clip itself goes silent. result.parts lists each track with its name, clip_id, start, end and frames. Offered only where features lists projects.stems; a clip is split once, and deleting the three parts gives its sound back. To save the three tracks and the original mix as four wav files, POST /projects/{id}/stems/export with the revision and the split clip\'s clip_id; the answer lists folder and files at once.',
'Finish the sound: after the cut is joined, POST /projects/{id}/finish_sound with the revision you read; wait for the job. In one job it splits each picture clip\'s sound where separation is offered and removes the separated music where it is a sustained score (shots, explosions and crowds filed there stay, at the ambience level), lays one score on a2 for the whole cut (music.caption composes it, music.source lays a file; music already on a2 stays), evens the dialogue, sets the music 16 LU under it, brings the cut to -18 LUFS with a -1 dBTP peak ceiling and fills digital silence with room tone. result gives loudness_lufs, true_peak_db, music_removed (per block: removed or kept, with the levels) and the steps in skipped; skipped.music is too_long for a cut over 600 s, and the rest still runs; then tell the user: The cut is over 10 minutes, so no music was composed. The other steps are done. To add music, run this again with a music file. Run again, only the clips split this time are judged and levelled.',
- 'Change a voice: POST /projects/{id}/voice/lines with the revision you read and a selection (clip_id, and start and end in seconds if only part) to write down the lines; read result.lines. Change the text of the lines to redo and POST /projects/{id}/voice/replace with the same selection and all lines (original_text unchanged); only the changed lines are spoken again, in the voice of the original, and the rest keep their sound. result.lines gives where each new line starts and ends; a line that cannot fit before the next one keeps its original voice with replaced false and warning too_long. POST /projects/{id}/voice/estimate with the lines answers at once with the seconds the changed lines take. Offered only where features lists projects.voice.',
+ 'Change a voice: POST /projects/{id}/voice/lines with the revision you read and a selection (clip_id, and start and end in seconds if only part) to write down the lines; read result.lines. Change the text of the lines to redo and POST /projects/{id}/voice/replace with the same selection and all lines (original_text unchanged); only the changed lines are spoken again, in the voice of the original, and the rest keep their sound. result.lines gives where each new line starts and ends; a line that cannot fit before the next one keeps its original voice with replaced false and warning too_long. POST /projects/{id}/voice/estimate with the lines answers at once with the seconds the changed lines take. Offered only where features lists projects.voice. Where features lists projects.voice.install instead, the dubbing model is not installed yet: the person downloads it (about 4.9 GB) from the voice change bar in the editor, and no agent route does it.',
'Subtitles: POST /projects/{id}/listen with mode transcribe (writes down what is said) or align (times the lines you give) and the revision you read; wait for the job and read result.lines, each with start and end frames. Then add them with a subtitles operation of cues {start, frames, text}; replace true swaps the whole track. With no speech model the job fails with no_speech_model: write the lines yourself.',
'The user sees one line under each picture clip: its note, or else the first line of its description. A description is generation text, often long and in English, so after you add, generate or change a clip, write a note (operation note) in the user\'s language saying what is in the picture: the subject first, then the setting, for example "Train through morning mist" (in Chinese "小火车穿过晨雾"). A short clip shows only the first few characters, about four in Chinese, and those must already make sense on their own. Do not write where the clip sits (opening, middle, ending, part 2): the order of the clips shows that. Do not write how far along it is: the clip already shows its progress. Keep it true when you change the clip again.',
'Reuse ref or Idempotency-Key only for the identical request. Source video/audio/thumbnail URLs require the same Agent token.',
diff --git a/freevideo_engine/agent/routes.py b/freevideo_engine/agent/routes.py
index dacb579..9810b2f 100644
--- a/freevideo_engine/agent/routes.py
+++ b/freevideo_engine/agent/routes.py
@@ -181,18 +181,25 @@ def stems_supported(machine):
return supported(machine.get('vram_gib'), uuid=machine.get('gpu_uuid')) and machine.get('device_backend', 'cuda') == 'cuda'
-def voice_ready(port):
- """Whether the dubbing model that changes a voice is on this machine."""
+def voice_state(port):
+ """(model ready, model can be downloaded here): the dubbing model is on this machine, or this machine could install it."""
service = getattr(port.server, '_freevideo_dubbing', None)
if service is None:
- return False
+ return False, False
try:
- return bool(service.info(wait=False).get('ready'))
+ info = service.info(wait=False)
except (OSError, ValueError):
- return False
+ return False, False
+ ready = bool(info.get('ready'))
+ return ready, not ready and bool(info.get('supported')) and bool(info.get('published', True))
+
+
+def voice_ready(port):
+ """Whether the dubbing model that changes a voice is on this machine."""
+ return voice_state(port)[0]
-def features(continuation, vlm, stems=False, voice=True):
+def features(continuation, vlm, stems=False, voice=True, voice_install=False):
"""What an agent can use here (ready says whether the engine can run now). A missing name is not offered."""
from .editor_runtime import available
rules = available()
@@ -205,7 +212,9 @@ def features(continuation, vlm, stems=False, voice=True):
'images.layers': rules, 'images.heal': rules, 'images.render': rules, 'projects.read': True,
**{'projects.' + name: rules for name in ('insert', 'split', 'move', 'trim', 'remove', 'export', 'generate', 'listen', 'music',
'finish_sound')},
- 'projects.stems': bool(rules and stems), 'projects.voice': bool(rules and stems and voice)}
+ 'projects.stems': bool(rules and stems), 'projects.voice': bool(rules and stems and voice),
+ # The machine could change a voice but the dubbing model is not there yet: the page offers its download.
+ 'projects.voice.install': bool(rules and stems and voice_install and not voice)}
def whitebox_support(jobs):
@@ -234,6 +243,7 @@ def capabilities(port, jobs):
vlm = {k: v for k, v in service.info(wait=False).items() if k in ('ready', 'model', 'license', 'bytes', 'busy')}
except (OSError, ValueError):
vlm = dict(ready=False)
+ voice = voice_state(port)
running, pending = port.snapshot()
from ..chain_plan import BLOCK_SECONDS
# One block is the limit when the backend cannot continue a video; plan and submit refuse the same requests.
@@ -243,7 +253,7 @@ def capabilities(port, jobs):
return dict(
api_version=API_VERSION, freevideo_version=release or __version__, build=__version__, ready=ready, problem=problem,
continuation=continuation,
- features=features(continuation, vlm, stems=stems_supported(machine), voice=voice_ready(port)),
+ features=features(continuation, vlm, stems=stems_supported(machine), voice=voice[0], voice_install=voice[1]),
whitebox=whitebox_support(jobs),
device=dict(backend=machine.get('device_backend', 'cuda') if machine else None,
vram_limit_gib=machine.get('vram_gib'), ram_limit_gib=machine.get('ram_gib')),
diff --git a/freevideo_engine/agent/voice.py b/freevideo_engine/agent/voice.py
index 96e9ff8..173a34e 100644
--- a/freevideo_engine/agent/voice.py
+++ b/freevideo_engine/agent/voice.py
@@ -31,6 +31,7 @@ MARGIN = .1 # extra file read around a line when its sound is measur
PREEMPTIONS = 8
BUSY_WAITS = 8
SPEED = dict(zh=4.5, en=2.8) # units per second of a voice, when the line gave no rate of its own
+RECOGNITION_CODES = {'no_sound': 'invalid_request', 'too_long': 'invalid_request', 'language': 'speech_language'}
DUB_CODES = {'out_of_memory': 'out_of_memory', 'model_missing': 'voice_model_missing',
'invalid_request': 'invalid_request', 'disk_space': 'storage_unavailable'}
SELECTION_MESSAGE = 'The selection must be a sound clip played at normal speed, forwards'
@@ -334,7 +335,7 @@ def run_voice_lines(jobs, row):
except subtitle_ears.Cancelled as error:
raise JobError('cancelled', 'Cancelled') from error
except subtitle_ears.EarsError as error:
- raise JobError(('invalid_request' if error.reason in ('no_sound', 'too_long') else 'voice_failed'),
+ raise JobError(RECOGNITION_CODES.get(error.reason, 'voice_failed'),
'The selection could not be recognised (%s)' % error.reason) from error
words = [word for line in heard['lines'] for word in line['words']]
rows = sentences.lines(words, audio, rate)
diff --git a/freevideo_engine/dubbing/service.py b/freevideo_engine/dubbing/service.py
index 0c36c65..0f569cf 100644
--- a/freevideo_engine/dubbing/service.py
+++ b/freevideo_engine/dubbing/service.py
@@ -146,9 +146,27 @@ class Service:
state['ready'] = pack.settle(root)
if state['ready']:
state['bytes'] = 0
+ # The voice change reads the lines with the speech model of the subtitle pack, so one download brings both.
+ speech = self.speech_state()
+ if speech and not speech[0]:
+ state['ready'], state['bytes'] = False, state['bytes'] + speech[1]
return dict(ready=state['ready'], model=pack.NAME, license=state['license'], bytes=state['bytes'],
published=state['published'], supported=state['supported'], busy=self.busy(), backends=backends.names())
+ @staticmethod
+ def speech_state():
+ """(all here, bytes still to download) of the speech pack (runtime, speech, language), or None where it cannot
+ be had. The pack lives where the recogniser looks for it (the model folder), not under the dubbing root."""
+ from .. import subtitle_pack
+ try:
+ state = subtitle_pack.status()
+ if not state['installable']:
+ return None
+ groups = [state['groups'][group] for group in subtitle_pack.GROUPS]
+ return all(group['ready'] for group in groups), sum(group['bytes'] for group in groups)
+ except Exception:
+ return None
+
def busy(self):
return self.thread is not None and self.thread.is_alive()
@@ -264,7 +282,36 @@ class Service:
folder.mkdir()
return folder
+ def install(self, root):
+ """The dubbing model, then the speech model; the progress counts both as one download."""
+ from .. import subtitle_pack
+ speech = self.speech_state()
+ missing = bool(speech and not speech[0])
+ extra = speech[1] if missing else 0
+ mine = []
+
+ def counted(offset, whole):
+ def report(row):
+ if 'total' in row:
+ mine.append(row['total'])
+ row = dict(row, done=min(row.get('done', 0) + offset, whole), total=whole)
+ self.progress(row)
+ return report
+ pack.install(root, self.first_segment(extra, mine), self.check)
+ if missing:
+ first = mine[-1] if mine else 0
+ subtitle_pack.install(subtitle_pack.GROUPS, None, counted(first, first + extra), self.check)
+
+ def first_segment(self, extra, mine):
+ def report(row):
+ if 'total' in row:
+ mine.append(row['total'])
+ row = dict(row, total=row['total'] + extra)
+ self.progress(row)
+ return report
+
def work(self, root, machine, action, value):
+ from .. import subtitle_pack
from ..locking import runtime_lock
from ..monitoring import save
started = time.monotonic()
@@ -272,7 +319,7 @@ class Service:
if action == 'install':
with runtime_lock(Path(root) / 'dubbing-install.lock', inherit=False):
self.check()
- pack.install(root, self.progress, self.check)
+ self.install(root)
self.check()
self.progress(dict(phase='complete'))
else:
@@ -284,7 +331,7 @@ class Service:
self.progress(dict(phase='cancelled'))
except BlockingIOError:
self.progress(dict(phase='failed', error='busy'))
- except pack.PackError as error:
+ except (pack.PackError, subtitle_pack.PackError) as error:
self.progress(dict(phase='failed', error=error.reason))
except Exception as error:
reason = str(error)
@@ -511,7 +558,7 @@ def register():
result = service.cancel(value.get('job'))
else:
running, pending = server.prompt_queue.get_current_queue()
- if running or pending:
+ if name == 'dub' and (running or pending):
raise ValueError('busy')
if name == 'dub':
await asyncio.to_thread(pack.settle, service.installation()[0])
diff --git a/web/editor.js b/web/editor.js
index 9fc8c16..b6fc8e5 100644
--- a/web/editor.js
+++ b/web/editor.js
@@ -30,7 +30,9 @@ import {createEditorGenbar, loadEditorComponents, editorBlockStates, blockMessag
import {createEditorMusic} from './editor_music.js';
import {createEditorRecord, RECORD_ICON} from './editor_record.js';
import {createEditorVoice} from './editor_voice.js';
-import {createVoiceStore, voiceAvailable} from './editor_voice_store.js';
+import {createVoiceStore, voiceFeatures} from './editor_voice_store.js';
+import {createVoiceInstall} from './editor_voice_install.js';
+import {voiceTarget} from './editor_voice_model.js';
import {MAX_MUSIC_TEXT as MUSIC_TEXT_LIMIT} from './editor_music_model.js';
import {createProgressConnection} from './progress_connection.js';
import {createSelectionActions, deletionStatus, isMultiple, isTyping, playheadIds, removableGaps, removeGaps} from './editor_select.js';
@@ -547,7 +549,7 @@ export function openEditor({api, app, from = null, panel = {}, components: given
// Music on the second sound track goes through the same bar; the bar shows a chosen piece's own job.
const music = createEditorMusic({state, store, t, completeSources, onStatus: () => genbar?.update(barValue)});
// Dubbing lines of a stretch of speech.
- let voiceReady = false;
+ let voiceReady = false, voiceInstallable = false;
const generatedSource = value => { const match = /^generated:(.+)$/.exec(String(value || '')); return match ? {kind: 'generated', id: match[1]} : null; };
// Playing one line: the playhead goes to its start and the picture plays up to its end, then stops.
let lineStop = null;
@@ -560,7 +562,7 @@ export function openEditor({api, app, from = null, panel = {}, components: given
const unwatch = state.subscribe(event => { if ((event.type ?? event) !== 'playhead') return; if (state.playhead >= to) { player.pause(); finish(); } else if (!player.playing) finish(); });
lineStop = finish;
}
- const voice = createEditorVoice({state, store: createVoiceStore({api, state, queue}), t, onChange: () => genbar?.update(barValue), available: () => voiceReady, playLine: playVoiceLine, comparePlayback: async (clipId, name) => {
+ const voice = createEditorVoice({state, store: createVoiceStore({api, state, queue}), t, onChange: () => genbar?.update(barValue), available: () => voiceReady, recheck: readVoice, playLine: playVoiceLine, comparePlayback: async (clipId, name) => {
// Hearing the other take changes nothing in the edit: only the preview swaps the sound.
const source = generatedSource(name);
if (!source) { player.previewClipSource(clipId, null); return; }
@@ -1429,8 +1431,19 @@ export function openEditor({api, app, from = null, panel = {}, components: given
return running;
}
- voiceAvailable(api).then(value => { voiceReady = value; if (!disposed) voice.refresh(); });
- actions.voice = {controller: voice};
+ // The dubbing model is downloaded from the bar where the lines would be; once it is there, the stretch chosen is looked at.
+ async function readVoice() {
+ const found = await voiceFeatures(api);
+ // An unanswered question changes nothing: the lines stay as they were, and a failed recognition says so.
+ if (found.unknown) return voiceReady;
+ voiceReady = found.ready; voiceInstallable = found.install;
+ if (!disposed) { voice.refresh(); if (found.install) voiceInstall.init(); genbar?.update(barValue); }
+ return found.ready;
+ }
+ const voiceInstall = createVoiceInstall({api, available: () => voiceInstallable && !voiceReady, target: selection => !!state.record && !!voiceTarget(state.record, selection),
+ onChange: () => { if (!disposed) genbar?.update(barValue); }, onReady: readVoice});
+ readVoice();
+ actions.voice = {controller: voice, install: voiceInstall};
actions.music = {target: selection => music.target(selection), preset: selection => music.preset(selection), choose: value => music.choose(value),
styles: music.styles, moods: music.moods, downloadBytes: music.downloadBytes};
genbar = createEditorGenbar(genHost, {state, t, actions, text: ''}); settleService();
@@ -1714,7 +1727,7 @@ export function openEditor({api, app, from = null, panel = {}, components: given
}
}
await store.activateProject(null).catch(() => {});
- rememberView(); disposed = true; music.dispose(); voice.dispose(); guide?.dispose(); transportControls.dispose(); toolbarMore.dispose(); player.dispose();
+ rememberView(); disposed = true; music.dispose(); voice.dispose(); voiceInstall.dispose(); guide?.dispose(); transportControls.dispose(); toolbarMore.dispose(); player.dispose();
textTools.dispose(); adjust.dispose(); notes.dispose(); pictureEdit.dispose();
audio.dispose(); stems?.dispose(); recording.dispose(); headerFit.dispose();
listeners.splice(0).forEach(remove => remove());
diff --git a/web/editor_genbar.js b/web/editor_genbar.js
index 00e2c14..e42a740 100644
--- a/web/editor_genbar.js
+++ b/web/editor_genbar.js
@@ -10,6 +10,7 @@ import {showEmptyPrompt} from './empty_prompt_notice.js';
import {segmented} from './editor_adjust.js';
import {createPassMode} from './pass_mode.js';
import {createVoicePanel} from './editor_voice.js';
+import {createInstallPanel} from './editor_voice_install.js';
import * as dubbing from './editor_voice_model.js';
const el = (tag, cls, text) => { const e = document.createElement(tag); if (cls) e.className = cls; if (text != null) e.textContent = text; return e; };
export const timeEstimate = (seconds, t) => seconds == null ? '' : seconds < 60
@@ -123,6 +124,14 @@ export function createEditorGenbar(host, {state, t, actions, text = ''}) {
// Dubbing: the lines of a chosen stretch of speech take the description box's place.
const voice = actions.voice || null, voicePanel = voice ? createVoicePanel(host, voice.controller, {t}) : null;
if (voicePanel) description.before(voicePanel.element);
+ // Where the dubbing model is missing and the engine offers it, the same place offers its download. The panel exists only
+ // while it is offered; with the model there, or on a machine that cannot change a voice, nothing of it is in the bar.
+ let installPanel = null;
+ const syncInstall = () => {
+ const offered = !!voice?.install?.offered?.() && !disposed;
+ if (offered && !installPanel) { installPanel = createInstallPanel(host, voice.install, {t, selection: () => previewSelection || state.selection}); description.before(installPanel.element); }
+ else if (!offered && installPanel) { installPanel.dispose(); installPanel = null; }
+ };
const failure = el('div', 'fv-ed-gen-failure fv-result-links'), failureBar = el('div', 'fv-ed-failure-actions fv-actions');
const failureReason = el('span', 'fv-ed-failure-reason'); failureReason.setAttribute('role', 'status');
const report = el('button', 'fv-ed-failure-report fv-action fv-action-secondary', t('Download diagnostic report', '下载诊断报告')); report.type = 'button';
@@ -183,6 +192,7 @@ export function createEditorGenbar(host, {state, t, actions, text = ''}) {
const musical = !!music?.target(selection);
const dub = !previewSelection && voice?.controller.target(selection) ? voice.controller.session(voice.controller.target(selection)) : null;
const voiced = !!dub && dub.phase !== 'none' && dub.phase !== 'error';
+ const installing = !previewSelection && !!voice?.install?.visible(selection);
const selected = !!selection && (!!previewSelection || musical || (actions.supportedSelection?.() ?? true));
// While a part generates, choosing another place offers Generate again; it is queued behind.
// A press is being sent for the parts in `pressing`; only that same selection waits for it.
@@ -195,11 +205,11 @@ export function createEditorGenbar(host, {state, t, actions, text = ''}) {
const opening = (starting || !!actions.selectionSending?.()) && !held;
const stopped = ['failed', 'cancelled', 'interrupted'].includes(status?.state);
host.dataset.mode = busy ? 'running' : selected ? 'selected' : 'idle';
- host.dataset.voice = String(voiced); voicePanel?.update();
+ host.dataset.voice = voiced || installing ? 'true' : dub?.phase === 'error' ? 'note' : 'false'; voicePanel?.update(); syncInstall(); installPanel?.update();
hint.hidden = !busy && !other;
// The description and Generate stay where they are while a part is made, greyed, so nothing around them moves;
// music being made shows only its progress and Cancel.
- input.hidden = false; generate.hidden = musical && busy;
+ input.hidden = false; generate.hidden = musical && busy || installing;
// A choice that will move to an empty spot can still be described first.
const writable = selected || !previewSelection && !!selection && !!actions.selectionMovable?.();
input.disabled = !writable || busy;
@@ -276,7 +286,7 @@ export function createEditorGenbar(host, {state, t, actions, text = ''}) {
generate.title = '';
if (assets) { if (selected && !busy && !musical) assets.refresh(); else assets.element.hidden = true; }
showMusicAssets(selected && !busy && musical && !previewSelection);
- if (selected && !busy && !voiced) {
+ if (selected && !busy && !voiced && !installing) {
const key = JSON.stringify(selection);
if (estimateCache?.key === key) generate.textContent += estimateCache.label;
const seconds = await actions.estimate(selection);
@@ -385,7 +395,7 @@ export function createEditorGenbar(host, {state, t, actions, text = ''}) {
if (!value && note.contains(retryService)) { retryService.remove(); note.hidden = true; }
showService();
}, getText() { expand.commit(); return input.value; }, update(value) { status = value; render(); }, preview(selection) { previewSelection = selection; render(); }, setText(value) { input.value = value || ''; state.setRangeText(input.value); if (bound && input.value !== bound.text) { dirty = true; written = input.value; } render(); },
- dispose() { disposed = true; ++serial; clearTimeout(noteTimer); stopPass?.(); passControl?.dispose(); document.removeEventListener('pointerdown', closePass, true); clearTimeout(refNoticeTimer); duration.dispose(); unsubscribe(); resize?.disconnect(); expand.dispose(); references?.dispose(); voicePanel?.dispose(); assets?.dispose(); Object.values(pickers).forEach(picker => picker.dispose()); }};
+ dispose() { disposed = true; ++serial; clearTimeout(noteTimer); stopPass?.(); passControl?.dispose(); document.removeEventListener('pointerdown', closePass, true); clearTimeout(refNoticeTimer); duration.dispose(); unsubscribe(); resize?.disconnect(); expand.dispose(); references?.dispose(); voicePanel?.dispose(); installPanel?.dispose(); assets?.dispose(); Object.values(pickers).forEach(picker => picker.dispose()); }};
}
// A missing optional module leaves the editor's existing progress in place.
diff --git a/web/editor_voice.css b/web/editor_voice.css
index e670c91..ec8dfe4 100644
--- a/web/editor_voice.css
+++ b/web/editor_voice.css
@@ -1,5 +1,5 @@
/* Dubbing lines in the generation bar. */
-.fv-ed-genbar[data-voice=true]{flex-wrap:wrap;align-items:center}
+.fv-ed-genbar[data-voice=true],.fv-ed-genbar[data-voice=note]{flex-wrap:wrap;align-items:center}
.fv-ed-genbar[data-voice=true] .fv-ed-description-box,.fv-ed-genbar[data-voice=true] .fv-ed-first-frame{display:none}
.fv-ed-genbar[data-voice=true] .fv-ed-gen-hint{flex:1}
.fv-ed-genbar[data-voice=true] .fv-ed-generate{margin-left:auto}
@@ -34,4 +34,19 @@
.fv-editor .fv-ed-voice textarea.fv-ed-voice-text{font-size:16px}
.fv-ed-voice-extra{padding-left:60px;flex-wrap:wrap}
}
-.fv-ed-voice-note:has(.fv-issue-button){display:flex;flex-wrap:wrap;align-items:center;gap:6px 8px}
+.fv-ed-voice-note:has(.fv-issue-button),.fv-ed-voice-install-note:has(.fv-issue-button){display:flex;flex-wrap:wrap;align-items:center;gap:6px 8px}
+/* The download of the dubbing model, in the place of the lines. */
+.fv-ed-voice-install{order:-1;flex:1 1 100%;min-width:0;display:flex;flex-wrap:wrap;align-items:center;gap:8px 12px}
+.fv-ed-voice-install[hidden]{display:none}
+/* While a part generates, its own line comes first and the download follows it. */
+.fv-ed-genbar[data-mode=running] .fv-ed-voice-install{order:3}
+.fv-ed-voice-install .fv-ed-voice-install-note{flex:1 1 220px;min-width:0;font-size:13px;color:var(--fv-ink)}
+.fv-ed-voice-install .fv-ed-voice-install-note[hidden]{display:none}
+.fv-ed-voice-install .fv-actions{flex:none}
+.fv-ed-voice-install .fv-actions [hidden]{display:none}
+.fv-ed-voice-bar{order:3;flex:1 1 100%;height:4px;border-radius:2px;background:var(--fv-border);overflow:hidden}
+.fv-ed-voice-bar[hidden]{display:none}
+.fv-ed-voice-bar>span{display:block;height:100%;width:0;border-radius:2px;background:var(--fv-accent,#6db8fa);transition:width .3s}
+.fv-ed-voice-bar[data-indeterminate=true]>span{width:35%;animation:fv-ed-voice-slide 1.4s ease-in-out infinite}
+@keyframes fv-ed-voice-slide{from{margin-left:-35%}to{margin-left:100%}}
+@media (prefers-reduced-motion:reduce){.fv-ed-voice-bar>span{transition:none}.fv-ed-voice-bar[data-indeterminate=true]>span{animation:none;width:100%;opacity:.5}}
diff --git a/web/editor_voice.js b/web/editor_voice.js
index 94319ec..36c3f27 100644
--- a/web/editor_voice.js
+++ b/web/editor_voice.js
@@ -9,17 +9,21 @@ import {repairAction} from './repair_hint.js';
const el = (tag, cls, text) => { const e = document.createElement(tag); if (cls) e.className = cls; if (text != null) e.textContent = text; return e; };
// What a failed run says: the lines the user typed are kept, whatever went wrong; the code never reaches the words.
-export function failureCopy(error, t) {
+export function failureCopy(error, t, recognising = false) {
if (isNetworkTypeError(error)) return {text: connectionLostText(t), report: false};
switch (error?.code) {
case 'out_of_memory': return {report: true, text: t('Not enough memory to finish dubbing. The edited lines are kept. Close other programs using the GPU, then redub.', '显存或内存不足,配音未完成,所改台词已保留。请关闭其他占用显卡的程序后重新配音。')};
case 'storage_unavailable': return {report: false, text: t('Could not write to disk, so dubbing did not finish. The edited lines are kept. Check the free disk space, then redub.', '无法写入磁盘,配音未完成,所改台词已保留。请检查磁盘空间后重新配音。')};
+ case 'no_speech_model': return {report: true, text: t('The speech model could not be used, so the lines could not be recognized.', '语音识别模型无法使用,未能识别台词。')};
+ case 'speech_language': return {report: false, text: t('The language of this part is not supported for dubbing yet.', '这一段的语言暂不支持配音。')};
case 'voice_model_missing': return {report: false, text: t('The dubbing model is not fully installed. ', '配音模型没有装全。') + t(...repairAction())};
- default: return {report: true, text: t('Dubbing did not finish. The edited lines are kept. Redub them to try again.', '配音未完成,所改台词已保留,请重新配音。')};
+ default:
+ if (recognising) return {report: true, text: t('The lines could not be recognized. Select this part again.', '未能识别台词。请重新选中这一段再试。')};
+ return {report: true, text: t('Dubbing did not finish. The edited lines are kept. Redub them to try again.', '配音未完成,所改台词已保留,请重新配音。')};
}
}
-export function createEditorVoice({state, store, t, onChange = () => {}, place = async () => {}, available = () => true, playLine = () => {}, comparePlayback = () => {}}) {
+export function createEditorVoice({state, store, t, onChange = () => {}, place = async () => {}, available = () => true, recheck = async () => true, playLine = () => {}, comparePlayback = () => {}}) {
const sessions = new Map();
let disposed = false, placing = false;
const target = (selection = state.selection) => available() && state.record && voice.voiceTarget(state.record, selection);
@@ -32,7 +36,7 @@ export function createEditorVoice({state, store, t, onChange = () => {}, place =
if (!found) return null;
const key = keyOf(found);
let current = sessions.get(key);
- if (current) return current;
+ if (current && current.phase !== 'error') return current;
current = {key, found, phase: 'finding', lines: [], texts: new Map(), results: new Map(), shortened: new Map(), compare: 'new',
active: null, index: 0, count: 0, remaining: null, failed: 0, revision: state.record.revision};
sessions.set(key, current); emit();
@@ -43,9 +47,14 @@ export function createEditorVoice({state, store, t, onChange = () => {}, place =
current.lines = result.lines; current.separated = result.separated; current.recognition = result.recognition;
current.rate = new Map(result.lines.map(line => [line.id, line.rate]));
} catch (value) {
- // A failed recognition is not kept: choosing the stretch again asks again.
- current.phase = 'error'; current.error = value;
- if (sessions.get(key) === current) sessions.delete(key);
+ // A failed recognition says why in the panel; choosing the stretch again asks again.
+ // A model that went missing after the check: the download row comes back and recognition starts again once it is there.
+ if (value?.code === 'no_speech_model' && !disposed && sessions.get(key) === current && !(await recheck().catch(() => true))) {
+ sessions.delete(key); emit(); return null;
+ }
+ // Cancelled: nothing to say, so the panel goes; choosing the stretch again asks again.
+ if (value?.code === 'cancelled') { if (sessions.get(key) === current) sessions.delete(key); emit(); return null; }
+ current.phase = 'error'; current.error = value; current.failure = value;
if (!disposed) onChange(); return current;
}
emit(); return current;
@@ -172,12 +181,12 @@ export function createVoicePanel(host, controller, {t}) {
const dubbing = current.phase === 'dubbing', ready = ['ready', 'done', 'dubbing'].includes(current.phase);
compare.hidden = !current.sources;
for (const button of choices) button.setAttribute('aria-pressed', String(button.dataset.value === current.compare));
- voiceName.hidden = !ready;
- const failure = current.failure && failureCopy(current.failure, t);
+ voiceName.hidden = !ready; top.hidden = !ready && compare.hidden;
+ const failure = current.failure && failureCopy(current.failure, t, current.phase === 'error');
note.replaceChildren();
if (failure) {
note.append(failure.text);
- if (failure.report) note.append(issueButton(t, () => ({where: ['Editor generation', '剪辑器生成'], message: failure.text, kind: current.failure?.code || null})));
+ if (failure.report) note.append(issueButton(t, () => ({where: ['Editor generation', '剪辑器生成'], message: failure.text + (current.failure?.detail ? `\n${current.failure.detail}` : ''), kind: current.failure?.code || null})));
} else note.textContent = current.notice === 'changed' ? t('This part changed during dubbing, so the new voice was not placed. Redub it.', '这一段在配音期间有改动,新声未放入。请重新配音。') : current.phase === 'none' ? t('No lines were found in this part.', '这一段没有识别到台词。') : current.phase === 'done' && current.failed ? voice.failedText(current.failed, t) : '';
note.hidden = !note.textContent;
if (current.phase === 'finding') {
diff --git a/web/editor_voice_install.js b/web/editor_voice_install.js
new file mode 100644
index 0000000..1322a77
--- /dev/null
+++ b/web/editor_voice_install.js
@@ -0,0 +1,185 @@
+// The dubbing model that changes a voice, downloaded from the place where the voice would be changed: a stretch of
+// speech is chosen, the model is not there, the bar offers "Download" and then shows the progress. The engine does the
+// download (resumable, cancellable); this keeps the page's side of it: what to say, the progress and the one job.
+// The first half is pure (sentences, percent); the second half talks to the engine's /freevideo/dubbing routes.
+import {issueButton} from './issue_button.js';
+
+const ROOT = '/freevideo/dubbing';
+const NBSP = ' ';
+const DEFAULT_BYTES = 4.9e9;
+const JOB_KEY = 'fv-dubbing-install-job';
+
+// "about 4.9 GB": the size the engine reports for what is still missing, the full model when it reports nothing.
+export const sizeText = bytes => `${((Number.isFinite(bytes) && bytes > 0 ? bytes : DEFAULT_BYTES) / 1e9).toFixed(1)}${NBSP}GB`;
+
+// 0..99 while the engine works (100 is only the finished model); null when the engine has not said how far it is.
+export function percent(row) {
+ if (!row || !(row.total > 0) || !Number.isFinite(row.done)) return null;
+ return Math.max(0, Math.min(99, Math.floor(row.done / row.total * 100)));
+}
+
+export const offerText = (bytes, t) => t(`Voice change needs the dubbing model (about ${sizeText(bytes)}).`, `换人声需要配音模型,约 ${sizeText(bytes)}。`);
+export const progressText = (value, t) => value == null ? t('Downloading the dubbing model', '正在下载配音模型')
+ : t(`Downloading the dubbing model ${value}%`, `正在下载配音模型 ${value}%`);
+
+// What a failed download says; the code never reaches the words. `report` is whether the problem can be reported.
+export function failureText(code, bytes, t) {
+ switch (code) {
+ case 'disk_space': return {report: true, text: t(`There is not enough disk space. The dubbing model needs about ${sizeText(bytes)}.`, `磁盘空间不足,配音模型需要约 ${sizeText(bytes)}。`)};
+ case 'download_failed': case 'network': return {report: true, text: t('The dubbing model could not be downloaded. Check the connection and try again.', '配音模型下载失败,请检查网络后重试。')};
+ default: return {report: true, text: t('The dubbing model could not be installed. Try again.', '配音模型未能安装,请重试。')};
+ }
+}
+
+const readJob = storage => { try { return storage?.getItem(JOB_KEY) || null; } catch { return null; } };
+const writeJob = (storage, value) => { try { value ? storage?.setItem(JOB_KEY, value) : storage?.removeItem(JOB_KEY); } catch { /* the job is simply not remembered */ } };
+const wait = ms => new Promise(resolve => setTimeout(resolve, ms));
+
+/**
+ * The download of the dubbing model. `available()` says whether the engine offers it (capabilities); `target(selection)`
+ * whether the chosen part is a stretch of speech; `onReady()` asks the page to read the capabilities again and returns
+ * whether the model is there now. A download that runs when the page opens is taken up again: by the job this browser
+ * remembers, else only as "downloading" (the engine does not hand its job to anyone else).
+ */
+export function createVoiceInstall({api, available = () => true, target = () => true, onChange = () => {}, onReady = async () => false,
+ storage = globalThis.localStorage, delay = wait, interval = 1000} = {}) {
+ const view = {phase: 'loading', percent: null, cancelling: false, error: null, bytes: 0};
+ let token = '', job = readJob(storage), disposed = false, polling = false, initial = null;
+ const set = patch => { Object.assign(view, patch); if (!disposed) onChange(); };
+ const read = async response => { try { return await response.json(); } catch { return null; } };
+ const info = async () => {
+ const response = await api.fetchApi(ROOT, {cache: 'no-store'});
+ const value = await read(response);
+ if (!response.ok || !value || value.error) throw new Error(value?.error || 'unavailable');
+ token = value.token || token;
+ return value;
+ };
+ async function call(action, body, again = true) {
+ const response = await api.fetchApi(`${ROOT}/${action}`, {method: 'POST', headers: {'Content-Type': 'application/json', 'X-FreeVideo-Dubbing': token}, body: JSON.stringify(body)});
+ const value = await read(response);
+ // A restarted engine has a new token: ask for it and send the same call once more.
+ if (response.status === 403 && again) { await info(); return call(action, body, false); }
+ if (!response.ok) throw Object.assign(new Error(value?.error || 'failed'), {code: value?.error || 'failed'});
+ return value;
+ }
+ const remember = value => { const moved = job !== value; job = value; writeJob(storage, value); if (moved && !disposed) onChange(); };
+ async function finish() {
+ remember(null);
+ let ready = false;
+ try { ready = await onReady(); } catch { /* the capabilities are read again with the next page */ }
+ if (!disposed) set({phase: ready ? 'ready' : 'idle', percent: null, cancelling: false, error: null});
+ }
+ function fail(code, keep = false) { if (!keep) remember(null); set({phase: 'failed', error: code, cancelling: false, percent: null}); }
+ // The engine's answer for the job; false once the job is over.
+ function apply(row) {
+ switch (row?.phase) {
+ case 'complete': return false;
+ case 'failed': fail(row.error || 'failed'); return null;
+ case 'cancelled': remember(null); set({phase: 'idle', percent: null, cancelling: false}); return null;
+ case 'download': case 'unpack': set({percent: percent(row)}); return true;
+ default: return true;
+ }
+ }
+ async function poll() {
+ if (polling) return;
+ polling = true;
+ let lost = 0;
+ try {
+ while (!disposed && view.phase === 'downloading') {
+ try {
+ if (job) {
+ const outcome = apply(await call('status', {job}));
+ if (outcome === false) return await finish();
+ if (outcome === null) return;
+ } else {
+ // Not this page's job: only whether the engine is still at it.
+ const value = await info();
+ if (!value.busy) { if (value.ready) return await finish(); set({phase: 'idle'}); return; }
+ }
+ lost = 0;
+ } catch (error) {
+ if (error.code === 'unknown_job') { remember(null); continue; }
+ // The engine cannot be reached: the job is kept, so Retry takes up the same download.
+ if (++lost >= 10) return fail('network', true);
+ }
+ await delay(interval);
+ }
+ } finally { polling = false; }
+ }
+ async function load() {
+ try {
+ const value = await info();
+ set({bytes: value.bytes});
+ if (value.ready) { set({phase: 'ready'}); await finish(); return; }
+ if (value.supported === false || value.published === false) { set({phase: 'unsupported'}); return; }
+ if (value.busy) { set({phase: 'downloading', percent: null}); poll(); return; }
+ remember(null); set({phase: 'idle'});
+ } catch { set({phase: 'unsupported'}); }
+ }
+ return {
+ view,
+ init() { return initial || (initial = load()); },
+ // Whether the engine offers the download at all (the panel exists only then).
+ offered() { return !disposed && available() && ['idle', 'downloading', 'failed'].includes(view.phase); },
+ // Whether the bar offers the download for this selection: the engine offers it and a stretch of speech is chosen.
+ visible(selection) { return !disposed && available() && ['idle', 'downloading', 'failed'].includes(view.phase) && !!target(selection); },
+ async start() {
+ if (view.phase === 'downloading') return;
+ set({phase: 'downloading', percent: 0, cancelling: false, error: null});
+ try {
+ if (!token) await info();
+ const value = await call('install', {accept_download: true});
+ remember(value.job);
+ poll();
+ } catch (error) {
+ if (error.code !== 'busy') return fail(error.code || 'network');
+ // The engine says it is busy: it is downloading already.
+ try {
+ const value = await info();
+ if (value.busy) { set({percent: null}); poll(); } else fail('failed');
+ } catch { fail('network'); }
+ }
+ },
+ async cancel() {
+ if (view.phase !== 'downloading' || !job || view.cancelling) return;
+ set({cancelling: true});
+ try { await call('cancel', {job}); } catch (error) { if (error.code === 'unknown_job') { remember(null); set({phase: 'idle', cancelling: false, percent: null}); } else set({cancelling: false}); }
+ },
+ hasJob: () => !!job,
+ dispose() { disposed = true; },
+ };
+}
+
+const el = (tag, cls, text) => { const e = document.createElement(tag); if (cls) e.className = cls; if (text != null) e.textContent = text; return e; };
+
+// The panel in the generation bar, where the lines would be: a sentence, and one button; or the progress and Cancel.
+export function createInstallPanel(host, install, {t, selection}) {
+ const element = el('div', 'fv-ed-voice-install'), note = el('div', 'fv-ed-voice-install-note'), bar = el('div', 'fv-ed-voice-bar'), fill = el('span');
+ const actions = el('div', 'fv-actions');
+ const make = (label, onclick, cls = '') => { const b = el('button', `fv-action ${cls}`.trim(), label); b.type = 'button'; b.onclick = onclick; return b; };
+ const download = make(t('Download', '下载'), () => install.start(), 'fv-primary'), retry = make(t('Retry', '重试'), () => install.start(), 'fv-primary');
+ const cancel = make(t('Cancel', '取消'), () => install.cancel());
+ note.setAttribute('role', 'status'); bar.setAttribute('role', 'progressbar'); bar.setAttribute('aria-valuemin', '0'); bar.setAttribute('aria-valuemax', '100');
+ bar.append(fill); actions.append(download, retry, cancel); element.append(note, bar, actions); element.hidden = true; host.append(element);
+ let shownText = null;
+ return {element, shown: () => !element.hidden, update() {
+ const view = install.view, shown = install.visible(selection());
+ element.hidden = !shown;
+ if (!shown) return;
+ const state = view.phase === 'downloading' ? 'downloading' : view.phase === 'failed' ? 'failed' : 'offer';
+ element.dataset.state = state;
+ const failure = state === 'failed' ? failureText(view.error, view.bytes, t) : null;
+ const text = state === 'downloading' ? progressText(view.percent, t) : failure ? failure.text : offerText(view.bytes, t);
+ if (shownText !== text) {
+ note.replaceChildren(text); shownText = text;
+ if (failure?.report) note.append(issueButton(t, () => ({where: ['Dubbing model download', '配音模型下载'], message: failure.text, kind: view.error || null})));
+ }
+ bar.hidden = state !== 'downloading';
+ if (state === 'downloading') {
+ if (view.percent == null) { bar.removeAttribute('aria-valuenow'); bar.dataset.indeterminate = 'true'; fill.style.width = ''; } else { bar.setAttribute('aria-valuenow', String(view.percent)); delete bar.dataset.indeterminate; fill.style.width = view.percent + '%'; }
+ }
+ download.hidden = state !== 'offer'; retry.hidden = state !== 'failed';
+ // Without the job (a download another page started) there is nothing to stop from here.
+ cancel.hidden = state !== 'downloading' || !install.hasJob?.(); cancel.disabled = view.cancelling;
+ }, dispose() { element.remove(); }};
+}
diff --git a/web/editor_voice_store.js b/web/editor_voice_store.js
index 2a654f2..92cd4c7 100644
--- a/web/editor_voice_store.js
+++ b/web/editor_voice_store.js
@@ -7,15 +7,21 @@ const ROOT = '/freevideo/agent/v1';
const ACTIVE = ['waiting', 'queued', 'running', 'cancelling'];
const wait = ms => new Promise(resolve => setTimeout(resolve, ms));
const detail = progress => { try { return JSON.parse(progress?.detail || 'null') || {}; } catch { return {}; } };
-const failure = (value, fallback) => Object.assign(new Error(value?.code || value?.error?.code || fallback), {code: value?.code || value?.error?.code || fallback});
+const failure = (value, fallback) => Object.assign(new Error(value?.code || value?.error?.code || fallback), {code: value?.code || value?.error?.code || fallback, detail: String(value?.message || value?.error?.message || '')});
-export async function voiceAvailable(api) {
+// What the engine offers for changing a voice: `ready` once the dubbing model is there, `install` where this machine could
+// change a voice but the model is still to be downloaded.
+export async function voiceFeatures(api) {
try {
const response = await agentGet(api, `${ROOT}/capabilities`);
- return !!(response.ok && (await response.json())?.features?.['projects.voice']);
- } catch { return false; }
+ if (!response.ok) return {ready: false, install: false, unknown: true};
+ const features = (await response.json())?.features;
+ return {ready: !!features?.['projects.voice'], install: !!features?.['projects.voice.install']};
+ } catch { return {ready: false, install: false, unknown: true}; }
}
+export async function voiceAvailable(api) { return (await voiceFeatures(api)).ready; }
+
export function createVoiceStore({api, state, queue}) {
let running = null;
const uuid = () => globalThis.crypto?.randomUUID?.() || `${Date.now()}-${Math.random()}`;
diff --git a/web/health.js b/web/health.js
index 3a515a4..c8c7560 100644
--- a/web/health.js
+++ b/web/health.js
@@ -14,7 +14,7 @@ const t = (en, zh) => cn ? zh : en;
const launchVisit = query.get('freevideo') === 'launch';
// Every script this folder ships; a test keeps the list in step with web/*.js.
export const MODULES = ['audio_original.js', 'chat_data.js', 'phone_model.js', 'phone.js', 'lan_access.js', 'qrcodegen.js', 'agent_activity.js', 'agent_confirm_settings.js', 'agent_connect.js', 'agent_session.js', 'autopilot.js', 'autopilot_chat.js', 'chat_attachments.js', 'autopilot_conversations.js', 'browser_extension.js', 'caret_rect.js', 'chain_support.js', 'chain_rules.js', 'timed_prompt.js', 'capability_view.js', 'cast_generate.js', 'cast_mention.js', 'cast_overlay.js', 'cast_source.js', 'compatibility.js', 'entry_showcase.js', 'error_panel.js', 'first_run_guide.js', 'fonts.js', 'freevideo.js', 'generation_progress.js',
- 'editor.js', 'editor_actions.js', 'editor_lifecycle.js', 'editor_adjust.js', 'editor_adjust_picture.js', 'editor_picture_fields.js', 'editor_picture_session.js', 'editor_preview_picture.js', 'editor_entry.js', 'editor_expand.js', 'editor_export_dialog.js', 'editor_first_frame.js', 'editor_media_references.js', 'editor_references.js', 'editor_genbar.js', 'editor_duration.js', 'editor_geometry.js', 'editor_library.js', 'editor_menu.js', 'editor_stems.js', 'editor_record.js', 'editor_record_model.js', 'editor_voice.js', 'editor_voice_model.js', 'editor_voice_store.js', 'editor_model.js', 'editor_frame.js', 'editor_player.js', 'editor_room.js', 'editor_select.js', 'editor_state.js', 'editor_store.js', 'editor_tracks.js', 'editor_generation.js', 'editor_transport.js', 'editor_transport_model.js', 'editor_audio.js', 'editor_audio_model.js', 'editor_audio_notes.js', 'editor_audio_replace.js', 'editor_audio_rules.js', 'editor_music.js', 'editor_music_model.js', 'editor_speed.js', 'editor_speed_model.js', 'editor_failure.js', 'editor_header_fit.js',
+ 'editor.js', 'editor_actions.js', 'editor_lifecycle.js', 'editor_adjust.js', 'editor_adjust_picture.js', 'editor_picture_fields.js', 'editor_picture_session.js', 'editor_preview_picture.js', 'editor_entry.js', 'editor_expand.js', 'editor_export_dialog.js', 'editor_first_frame.js', 'editor_media_references.js', 'editor_references.js', 'editor_genbar.js', 'editor_duration.js', 'editor_geometry.js', 'editor_library.js', 'editor_menu.js', 'editor_stems.js', 'editor_record.js', 'editor_record_model.js', 'editor_voice.js', 'editor_voice_install.js', 'editor_voice_model.js', 'editor_voice_store.js', 'editor_model.js', 'editor_frame.js', 'editor_player.js', 'editor_room.js', 'editor_select.js', 'editor_state.js', 'editor_store.js', 'editor_tracks.js', 'editor_generation.js', 'editor_transport.js', 'editor_transport_model.js', 'editor_audio.js', 'editor_audio_model.js', 'editor_audio_notes.js', 'editor_audio_replace.js', 'editor_audio_rules.js', 'editor_music.js', 'editor_music_model.js', 'editor_speed.js', 'editor_speed_model.js', 'editor_failure.js', 'editor_header_fit.js',
'editor_loader.js', 'editor_text_coverage.js', 'editor_text.js', 'editor_toolbar_more.js', 'editor_text_model.js', 'editor_text_layout.js', 'editor_notes.js', 'editor_icons.js', 'dialog_keys.js', 'done_notify.js', 'failure_issue.js', 'feedback.js', 'frame_sizes.js', 'health.js', 'image_commands.js', 'image_editor.js', 'image_editor_engine.js', 'image_generation.js', 'image_lora.js', 'launch_visit.js', 'launcher.js', 'length_plan.js', 'lora_triggers.js', 'lora_check.js', 'library.js', 'motion.js', 'native_errors.js', 'translate_guard.js', 'output_download.js', 'port_notice.js', 'preview_scene.js',
'progress_connection.js', 'prompt_draft.js', 'prompt_enhance.js', 'prompt_references.js', 'prompt_sections.js', 'prompt_terms.js', 'request_assets.js', 'repair_hint.js', 'report_issue.js', 'issue_button.js', 'studio_recent.js', 'task_groups.js',
'result_actions.js', 'result_reuse.js', 'sampling_effort.js', 'pass_mode.js','setup.js', 'share.js', 'share_layout.js', 'studio.js', 'studio_chain.js', 'studio_extend.js', 'studio_length.js', 'first_frame_row.js', 'replace_person.js', 'replace_state.js', 'optional_inputs.js', 'other_usage.js', 'studio_queue.js', 'studio_size.js',