diff --git a/static/js/voice-clone.js b/static/js/voice-clone.js index 44158df..6aada29 100644 --- a/static/js/voice-clone.js +++ b/static/js/voice-clone.js @@ -1,3 +1,26 @@ +// ── Clone: recommended sample sentences ────────────────────────────────── + +const CLONE_SAMPLE_TEXTS = { + EN: 'The clear morning light warmed the quiet studio as I described a silver train, a bright red apple, and the gentle rhythm of rain on the window.', + DE: 'Das klare Morgenlicht waermte das ruhige Studio, waehrend ich einen silbernen Zug, einen roten Apfel und den sanften Rhythmus des Regens am Fenster beschrieb.', + IT: "La luce chiara del mattino scaldava lo studio tranquillo mentre descrivevo un treno d'argento, una mela rossa e il ritmo leggero della pioggia alla finestra.", + ES: 'La clara luz de la manana calentaba el estudio tranquilo mientras describia un tren plateado, una manzana roja y el suave ritmo de la lluvia en la ventana.', + FR: 'La lumiere claire du matin rechauffait le studio calme pendant que je decrivais un train argente, une pomme rouge et le doux rythme de la pluie sur la fenetre.', + PT: 'A luz clara da manha aquecia o estudio tranquilo enquanto eu descrevia um comboio prateado, uma maca vermelha e o ritmo suave da chuva na janela.', + NL: 'Het heldere ochtendlicht verwarmde de stille studio terwijl ik een zilveren trein, een rode appel en het zachte ritme van regen op het raam beschreef.', + PL: 'Jasne poranne swiatlo ogrzewalo ciche studio, gdy opisywalem srebrny pociag, czerwone jablko i lagodny rytm deszczu na oknie.', +}; + +(function initCloneSampleText() { + const sel = $('clone-sample-lang'); + const txt = $('clone-sample-text'); + if (!sel || !txt) return; + txt.value = CLONE_SAMPLE_TEXTS[sel.value] || CLONE_SAMPLE_TEXTS.EN; + sel.addEventListener('change', () => { + txt.value = CLONE_SAMPLE_TEXTS[sel.value] || CLONE_SAMPLE_TEXTS.EN; + }); +})(); + // ── WaveSurfer ──────────────────────────────────────────────────────────── let ws = null, wsRegions = null, currentFileId = null, trimmedFileId = null, designedFileId = null, editingVoiceId = null, editingVoicePath = null; diff --git a/static/sections/s-clone.html b/static/sections/s-clone.html index 55b305f..a11d524 100644 --- a/static/sections/s-clone.html +++ b/static/sections/s-clone.html @@ -30,6 +30,22 @@
Record a fresh sample with live input level monitoring.
+