Voices has two views switched at the top, Characters and Voice-over, sharing the character list (clicking a character on Voice-over makes it speak); the rail's Voices entry reopens the view used last, and the separate Voice-over rail entry is gone. Generation settings: language as choices and speed as a slider in view, the sampling numbers folded under fine-tuning with plain names, no sideways scroll. A finished take says how long it took and links to the audio gallery. Line cards show editing buttons on hover, the emotion's reference clip sits beside its chips, and a character with only its main voice shows no chips. The audio gallery shows each file's lines once and can open them on Voice-over for another take; the list no longer repeats the gallery. Also fixes the audio list staying empty after a reload. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
31 lines
1.1 KiB
JavaScript
31 lines
1.1 KiB
JavaScript
/**
|
|
* The Voices page's two views as one switch at the top of each: Characters (the cards,
|
|
* ui_audio_studio.js, shell page `voices`) and Voice-over (ui_script_page.js, shell page
|
|
* `script`). Both sit under the rail's Voices entry and share the character list.
|
|
*/
|
|
|
|
import { t } from './interface_settings.js';
|
|
|
|
const TABS = [['voices', 'voiceTabCharacters'], ['script', 'scriptDirectorTitle']];
|
|
|
|
/** The switch; `active`: 'voices' | 'script'. */
|
|
export function renderVoiceTabs(owner, active) {
|
|
const bar = document.createElement('div');
|
|
bar.className = 'anomalous-voice-tabs';
|
|
bar.setAttribute('role', 'tablist');
|
|
for (const [page, key] of TABS) {
|
|
const tab = document.createElement('button');
|
|
tab.type = 'button';
|
|
tab.className = 'anomalous-voice-tab';
|
|
tab.textContent = t(key);
|
|
tab.dataset.tour = `voice-tab-${page}`;
|
|
tab.setAttribute('role', 'tab');
|
|
tab.setAttribute('aria-selected', String(page === active));
|
|
tab.onclick = () => {
|
|
if (page !== active) owner?.goTo(page);
|
|
};
|
|
bar.append(tab);
|
|
}
|
|
return bar;
|
|
}
|