The truly free, open-source, local-first, cross-platform CapCut replacement. Scriptable through a JSON-RPC API & MCP.
Rust ffmpegfree-video-editormodel-context-protocolnon-linear-editoroffline-firstopen-source-video-editorself-hostedvideo-editingvideo-editing-automationvideo-editing-softwarevideo-editing-toolsvideo-editorvoice-cloningyoutube-automationyoutube-shorts
feat(captions, speech): a transcription's and a read's bar moves through each stage and says how long is left
Jareerc71f9001ed7c
diff --git a/src/crates/concat-speech/src/lib.rs b/src/crates/concat-speech/src/lib.rsindex 83cd34b3..d7cc5103 100644--- a/src/crates/concat-speech/src/lib.rs+++ b/src/crates/concat-speech/src/lib.rs@@ -40,6 +40,29 @@ pub const fn accelerated() -> bool {cfg!(any(target_os = "macos", target_os = "windows"))}+/// How far a transcription or a read has got, as it reports it: the stage+/// it is in, and in the work itself where it is and where the step under+/// way will leave it. A job is mostly long waits between reports - whisper+/// reports once per thirty seconds of sound, sherpa once per sentence - and+/// `next` is what lets a bar move through the wait without promising more+/// than the job has done.+#[derive(Clone, Copy, Debug, PartialEq)]+pub enum JobStage {+ /// Reading the sound in: a clip's, or the recording a voice is read+ /// from.+ Reading,+ /// Loading the model. Not reported when it is still loaded from the+ /// run before.+ Loading,+ /// The work itself.+ Working {+ /// How much of it is finished, `0..=1`.+ done: f32,+ /// Where the step under way ends, `done..=1`.+ next: f32,+ },+}+/// Progress for one model download.#[derive(Clone, Debug, PartialEq, Eq)]pub struct DownloadProgress {diff --git a/src/crates/concat-speech/src/transcribe.rs b/src/crates/concat-speech/src/transcribe.rsindex 0a400c78..50f3276c 100644--- a/src/crates/concat-speech/src/transcribe.rs+++ b/src/crates/concat-speech/src/transcribe.rs@@ -28,7 +28,7 @@ use concat_media::{AudioDecoder, AudioOptions, SampleFormat};use serde::{Deserialize, Serialize};use whisper_rs::{FullParams, SamplingStrategy, WhisperContext, WhisperContextParameters};-use crate::DownloadProgress;+use crate::{DownloadProgress, JobStage};/// One downloadable Whisper model. Sizes are approximate, for progress bars/// when the server declines to send a Content-Length.@@ -307,9 +307,17 @@ impl Transcriber {.map_err(|error| format!("could not remove {}: {error}", file.display()))}+ /// The model still loaded from the last run, which the next run on it+ /// does not load again. None while a run holds it.+ pub fn loaded_model(&self) -> Option<String> {+ let loaded = self.model.try_lock().ok()?;+ loaded.as_ref().map(|model| model.id.clone())+ }+/// Transcribes one clip's audio window into caption segments. Blocks- /// for the whole run: run it on its own thread. `progress` is called- /// with a 0..100 percentage as whisper works.+ /// for the whole run: run it on its own thread. `progress` is told each+ /// stage as it begins, and in whisper's work each window it starts:+ /// whisper reads thirty seconds at a time, so `next` is a window on.////// Timestamps come back relative to the window: 0 is `source_start`. The/// caller owns the clip, so the map onto the timeline (divide by speed,@@ -318,7 +326,7 @@ impl Transcriber {&self,dirs: &AppDirs,request: &TranscribeRequest,- progress: impl FnMut(i32) + Send + 'static,+ mut progress: impl FnMut(JobStage) + Send + 'static,) -> Result<Vec<Segment>, String> {let job = self.gate.begin("transcription")?;let cancel = job.cancel_handle();@@ -336,6 +344,7 @@ impl Transcriber {}// The window, as whisper wants it: 16 kHz mono floats.+ progress(JobStage::Reading);let mut decoder = AudioDecoder::open(&request.path,&AudioOptions {@@ -363,6 +372,7 @@ impl Transcriber {.map_err(|_| "transcriber state poisoned".to_owned())?;if loaded.as_ref().map(|model| model.id.as_str()) != Some(request.model_id.as_str()) {// Load before overwriting: a failed load keeps the old model.+ progress(JobStage::Loading);let context =WhisperContext::new_with_params(&model_path, WhisperContextParameters::default()).map_err(|error| format!("could not load the model: {error}"))?;@@ -410,7 +420,20 @@ impl Transcriber {params.set_abort_callback(Some(abort_when_set));params.set_abort_callback_user_data(Arc::as_ptr(&cancel) as *mut std::ffi::c_void);}- params.set_progress_callback_safe(progress);+ // Whisper calls back as it starts each window, with how far into+ // the sound it is; the window it starts reads thirty seconds more.+ let window = (30.0 / request.window).min(1.0) as f32;+ progress(JobStage::Working {+ done: 0.0,+ next: window,+ });+ params.set_progress_callback_safe(move |percent: i32| {+ let done = (percent as f32 / 100.0).clamp(0.0, 1.0);+ progress(JobStage::Working {+ done,+ next: (done + window).min(1.0),+ });+ });state.full(params, &samples)@@ -521,7 +544,7 @@ mod real_audio {model_id: "tiny.en".to_owned(),};let segments = transcriber- .transcribe(&dirs, &request, |percent| eprintln!("{percent}%"))+ .transcribe(&dirs, &request, |stage| eprintln!("{stage:?}")).expect("transcription");for segment in &segments {eprintln!("{:.2}-{:.2} {}", segment.start, segment.end, segment.text);diff --git a/src/crates/concat-speech/src/tts.rs b/src/crates/concat-speech/src/tts.rsindex e64c90c6..3c4a4cca 100644--- a/src/crates/concat-speech/src/tts.rs+++ b/src/crates/concat-speech/src/tts.rs@@ -48,7 +48,7 @@ use sherpa_onnx::{OfflineTtsModelConfig, OfflineTtsPocketModelConfig,};-use crate::DownloadProgress;+use crate::{DownloadProgress, JobStage};/// Which network a bundle is, and so which voices it reads with and how/// the engine is configured for it.@@ -704,14 +704,23 @@ impl Speech {.map_err(|error| format!("could not remove {}: {error}", dir.display()))}+ /// The model still loaded from the last read, which the next read+ /// with it does not load again. None while a read holds it.+ pub fn loaded_model(&self) -> Option<String> {+ let engine = self.engine.try_lock().ok()?;+ engine.as_ref().map(|cached| cached.model_id.clone())+ }+/// Synthesizes one narration clip into `<project>/audio/`. Blocks for- /// the whole synthesis: run it on its own thread. `progress` is called- /// with a 0..1 fraction as sentences complete.+ /// the whole synthesis: run it on its own thread. `progress` is told+ /// each stage as it begins, and in the reading itself how far it is:+ /// Chatterbox's as it writes, Kokoro's and Pocket's as each sentence+ /// is done.pub fn speak(&self,dirs: &AppDirs,request: &SpeakRequest,- progress: impl FnMut(f32) + Send + 'static,+ mut progress: impl FnMut(JobStage) + Send + 'static,) -> Result<SpeakResult, String> {let job = self.gate.begin("speech generation")?;let cancel = job.cancel_handle();@@ -792,6 +801,7 @@ impl Speech {.is_none_or(|cached| cached.model_id != request.model_id);if stale {// Load before overwriting: a failed load keeps the old engine.+ progress(JobStage::Loading);let loading = std::time::Instant::now();let load = |accelerated: bool| -> Result<Engine, String> {log::info!(@@ -873,15 +883,22 @@ impl Speech {#[cfg(feature = "chatterbox")]let tts = match tts {Engine::Chatterbox(chatterbox) => {+ progress(JobStage::Reading);let samples = reference_samples(&recordings, request)?;- let mut progress = progress;+ progress(JobStage::Working {+ done: 0.0,+ next: CHATTERBOX_STEP,+ });let (spoken, on_cpu) = read_or_on_cpu(chatterbox.as_ref(),accelerated,&request.model_id,|chatterbox| {- chatterbox.speak(text, &samples, &cancel, &mut |fraction| {- progress(fraction);+ chatterbox.speak(text, &samples, &cancel, &mut |done| {+ progress(JobStage::Working {+ done,+ next: (done + CHATTERBOX_STEP).min(1.0),+ });})},|| crate::chatterbox::Engine::load(&dir, false),@@ -931,6 +948,7 @@ impl Speech {..Default::default()},_ => {+ progress(JobStage::Reading);let samples = reference_samples(&recordings, request)?;GenerationConfig {speed,@@ -951,9 +969,17 @@ impl Speech {}};+ // Sherpa reports as each sentence is done, and the next is about+ // as long as the average one so far: before the first report, one+ // of the sentences the text appears to have.+ let first = 1.0 / sentences(text) as f32;+ progress(JobStage::Working {+ done: 0.0,+ next: first,+ });let progress_cancel = Arc::clone(&cancel);- let mut progress = progress;let mut last_fraction = -1.0f32;+ let mut reports = 0u32;let audio = tts.generate_with_config(text,@@ -964,9 +990,14 @@ impl Speech {}// The engine reports once per sentence; only meaningful// movement is worth a redraw.+ reports += 1;if fraction - last_fraction >= 0.01 {last_fraction = fraction;- progress(fraction);+ let step = fraction / reports as f32;+ progress(JobStage::Working {+ done: fraction,+ next: (fraction + step).min(1.0),+ });}true}),@@ -1028,6 +1059,21 @@ fn recordings_dir(dirs: &AppDirs) -> Result<PathBuf, String> {model_dir(dirs, POCKET_ID)}+/// How far ahead of Chatterbox's last report its next is taken to be: it+/// reports every few tokens, so a short way.+const CHATTERBOX_STEP: f32 = 0.02;++/// How many sentences `text` appears to have, at least one: the stretches+/// with words in them between full stops, question and exclamation marks+/// (and their CJK forms) and line breaks. An estimate, for a bar, of how+/// sherpa will split it.+fn sentences(text: &str) -> usize {+ text.split(['.', '!', '?', '。', '!', '?', '\n'])+ .filter(|sentence| sentence.chars().any(char::is_alphanumeric))+ .count()+ .max(1)+}+/// The recording a request reads the voice from, as mono samples at/// [`REFERENCE_RATE`]: one of the stock recordings in `dir` for a named/// voice, or the request's reference for a chosen one, cut to@@ -1214,6 +1260,18 @@ fn load_kokoro(dir: &Path, accelerated: bool) -> Result<OfflineTts, String> {mod tests {use super::*;+ /// The sentences a bar expects are the stretches with words in them:+ /// trailing marks, ellipses and blank lines add none, and a text with+ /// no mark at all is one.+ #[test]+ fn sentences_are_the_stretches_with_words() {+ assert_eq!(sentences("Hello there. How are you? Fine!"), 3);+ assert_eq!(sentences("Wait... what?!\n\nOkay."), 3);+ assert_eq!(sentences("no marks at all"), 1);+ assert_eq!(sentences("。!"), 1);+ assert_eq!(sentences("你好。再见!"), 2);+ }+/// A read the accelerator's runtime fails is read again once on the/// CPU, and the CPU engine comes back to be kept: DirectML refused/// Chatterbox's attention mid-read, after it had loaded (#291).diff --git a/src/crates/concat/locales/ar.json b/src/crates/concat/locales/ar.jsonindex a1d72cd6..d34ec87e 100644--- a/src/crates/concat/locales/ar.json+++ b/src/crates/concat/locales/ar.json@@ -17,6 +17,7 @@"captions.oneTitlePerPhrase": "عنوان لكل عبارة منطوقة، مقصوص على توقيت الكلمات نفسها، على أول مسار فيه متّسع.","captions.oneTitlePerSentence": "عنوان لكل جملة، يبقى طوال المدة اللازمة لقراءته، واحدًا تلو الآخر على أول مسار فيه متّسع.","captions.placement": "الموضع",+ "captions.readingTheSound": "جارٍ قراءة صوت المقطع","captions.transcribing": "جارٍ التفريغ النصي","captions.typeWordsPutScreen": "اكتب الكلمات التي ستظهر على الشاشة…","captions.useVoiceFromTimeline": "استخدام الصوت من المخطط الزمني",@@ -91,6 +92,7 @@"clipInspector.transitionInto": "إلى {0}","clipInspector.treatments": "المعالجات","clipInspector.volume": "مستوى الصوت",+ "common.aboutLeft": "بقي نحو {0}:{1}","common.adjust": "ضبط","common.apply": "تطبيق","common.audio": "الصوت",@@ -813,6 +815,7 @@"speech.importClipVoiceFirst": "استورد أولًا مقطعًا فيه صوت.","speech.italian": "إيطالي","speech.japanese": "ياباني",+ "speech.loadingTheModel": "جارٍ تحميل نموذج الصوت","speech.long": "طويلة","speech.longer": "أطول","speech.male": "ذكر",@@ -826,6 +829,7 @@"speech.pickSampleVoice": "اختر عيّنة فيها صوت","speech.portuguese": "برتغالي","speech.quick": "سريع",+ "speech.readingTheSample": "جارٍ قراءة تسجيل الصوت","speech.readsAnyVoiceFew": "يقرأ بأي صوت من بضع ثوانٍ من تسجيل: واحد مرفق به، أو عيّنة من الحاوية.","speech.readsVoiceHeardClip": "يقرأ بالصوت المسموع في المقطع المحدّد على المخطط الزمني","speech.readsVoiceHeardRecording": "يقرأ بالصوت المسموع في تسجيل من الحاوية. الثواني العشر الأولى من النقطة المختارة أدناه هي ما يستمع إليه النموذج.",diff --git a/src/crates/concat/locales/bn.json b/src/crates/concat/locales/bn.jsonindex 970cffa7..318f2791 100644--- a/src/crates/concat/locales/bn.json+++ b/src/crates/concat/locales/bn.json@@ -17,6 +17,7 @@"captions.oneTitlePerPhrase": "প্রতিটি বলা বাক্যাংশের জন্য একটি করে টাইটেল, শব্দের নিজস্ব সময় অনুযায়ী কাটা, জায়গা আছে এমন প্রথম লেনে।","captions.oneTitlePerSentence": "প্রতিটি বাক্যের জন্য একটি করে টাইটেল, পড়তে যতক্ষণ লাগে ততক্ষণ ধরে রাখা হয়, জায়গা আছে এমন প্রথম লেনে একের পর এক।","captions.placement": "অবস্থান",+ "captions.readingTheSound": "ক্লিপের শব্দ পড়া হচ্ছে","captions.transcribing": "ট্রান্সক্রাইব করা হচ্ছে","captions.typeWordsPutScreen": "স্ক্রিনে দেখানোর শব্দগুলো লিখুন…","captions.useVoiceFromTimeline": "টাইমলাইনের কণ্ঠ ব্যবহার করুন",@@ -91,6 +92,7 @@"clipInspector.transitionInto": "{0}-এ প্রবেশ","clipInspector.treatments": "ট্রিটমেন্ট","clipInspector.volume": "ভলিউম",+ "common.aboutLeft": "আর প্রায় {0}:{1} বাকি","common.adjust": "সমন্বয় করুন","common.apply": "প্রয়োগ করুন","common.audio": "অডিও",@@ -813,6 +815,7 @@"speech.importClipVoiceFirst": "আগে কণ্ঠ আছে এমন একটি ক্লিপ ইমপোর্ট করুন।","speech.italian": "ইতালীয়","speech.japanese": "জাপানি",+ "speech.loadingTheModel": "কণ্ঠ মডেল লোড হচ্ছে","speech.long": "লম্বা","speech.longer": "আরও লম্বা","speech.male": "পুরুষ",@@ -826,6 +829,7 @@"speech.pickSampleVoice": "কণ্ঠ আছে এমন একটি নমুনা বেছে নিন","speech.portuguese": "পর্তুগিজ","speech.quick": "দ্রুত",+ "speech.readingTheSample": "কণ্ঠের রেকর্ডিং পড়া হচ্ছে","speech.readsAnyVoiceFew": "কয়েক সেকেন্ডের রেকর্ডিং থেকে যেকোনো কণ্ঠে পড়ে: সাথে থাকা একটি, বা বিনের নমুনা।","speech.readsVoiceHeardClip": "টাইমলাইনে নির্বাচিত ক্লিপে শোনা কণ্ঠে পড়ে","speech.readsVoiceHeardRecording": "বিনের রেকর্ডিংয়ে শোনা কণ্ঠে পড়ে। নিচে নির্বাচিত পয়েন্ট থেকে প্রথম দশ সেকেন্ড মডেলটি শোনে।",diff --git a/src/crates/concat/locales/de.json b/src/crates/concat/locales/de.jsonindex f1aa103c..44f4208d 100644--- a/src/crates/concat/locales/de.json+++ b/src/crates/concat/locales/de.json@@ -17,6 +17,7 @@"captions.oneTitlePerPhrase": "Ein Titel pro gesprochenem Satz, im Takt der Wörter geschnitten, auf der ersten freien Spur.","captions.oneTitlePerSentence": "One title per sentence, held for as long as it takes to read, one after another on the first lane with room.","captions.placement": "Platzierung",+ "captions.readingTheSound": "Ton des Clips wird gelesen","captions.transcribing": "Wird transkribiert","captions.typeWordsPutScreen": "Type the words to put on screen…","captions.useVoiceFromTimeline": "Stimme aus der Zeitleiste verwenden",@@ -91,6 +92,7 @@"clipInspector.transitionInto": "In {0}","clipInspector.treatments": "Aufbereitung","clipInspector.volume": "Lautstärke",+ "common.aboutLeft": "Noch etwa {0}:{1}","common.adjust": "Anpassen","common.apply": "Anwenden","common.audio": "Audio",@@ -813,6 +815,7 @@"speech.importClipVoiceFirst": "Importiere zuerst einen Clip, in dem eine Stimme zu hören ist.","speech.italian": "Italienisch","speech.japanese": "Japanisch",+ "speech.loadingTheModel": "Stimmmodell wird geladen","speech.long": "lang","speech.longer": "länger","speech.male": "männlich",@@ -826,6 +829,7 @@"speech.pickSampleVoice": "Wähle eine Probe, in der eine Stimme zu hören ist","speech.portuguese": "Portugiesisch","speech.quick": "Schnell",+ "speech.readingTheSample": "Stimmaufnahme wird gelesen","speech.readsAnyVoiceFew": "Liest in jeder Stimme aus ein paar Sekunden einer Aufnahme: einer, die mitgeliefert wird, oder einer Probe aus den Medien.","speech.readsVoiceHeardClip": "Liest in der Stimme, die im auf der Zeitleiste ausgewählten Clip zu hören ist","speech.readsVoiceHeardRecording": "Liest in der Stimme, die in einer Aufnahme aus den Medien zu hören ist. Die ersten zehn Sekunden ab der unten gewählten Stelle sind das, worauf das Modell hört.",diff --git a/src/crates/concat/locales/en.json b/src/crates/concat/locales/en.jsonindex 973ef621..773b11f5 100644--- a/src/crates/concat/locales/en.json+++ b/src/crates/concat/locales/en.json@@ -17,6 +17,7 @@"captions.oneTitlePerPhrase": "One title per phrase spoken, cut to the words' own timing, on the first lane with room.","captions.oneTitlePerSentence": "One title per sentence, held for as long as it takes to read, one after another on the first lane with room.","captions.placement": "Placement",+ "captions.readingTheSound": "Reading the clip's sound","captions.transcribing": "Transcribing","captions.typeWordsPutScreen": "Type the words to put on screen…","captions.useVoiceFromTimeline": "Use voice from timeline",@@ -91,6 +92,7 @@"clipInspector.transitionInto": "Into {0}","clipInspector.treatments": "Treatments","clipInspector.volume": "Volume",+ "common.aboutLeft": "About {0}:{1} left","common.adjust": "Adjust","common.apply": "Apply","common.audio": "Audio",@@ -813,6 +815,7 @@"speech.importClipVoiceFirst": "Import a clip with a voice in it first.","speech.italian": "Italian","speech.japanese": "Japanese",+ "speech.loadingTheModel": "Loading the voice model","speech.long": "long","speech.longer": "longer","speech.male": "male",@@ -826,6 +829,7 @@"speech.pickSampleVoice": "Pick a sample with a voice in it","speech.portuguese": "Portuguese","speech.quick": "Quick",+ "speech.readingTheSample": "Reading the voice recording","speech.readsAnyVoiceFew": "Reads in any voice from a few seconds of a recording: one it ships with, or a sample from the bin.","speech.readsVoiceHeardClip": "Reads in the voice heard in the clip selected on the timeline","speech.readsVoiceHeardRecording": "Reads in the voice heard in a recording from the bin. The first ten seconds from the point chosen below are what the model listens to.",diff --git a/src/crates/concat/locales/es.json b/src/crates/concat/locales/es.jsonindex da9c8bc2..5264fe7f 100644--- a/src/crates/concat/locales/es.json+++ b/src/crates/concat/locales/es.json@@ -17,6 +17,7 @@"captions.oneTitlePerPhrase": "Un título por frase hablada, ajustado al ritmo de las palabras, en la primera pista con espacio.","captions.oneTitlePerSentence": "One title per sentence, held for as long as it takes to read, one after another on the first lane with room.","captions.placement": "Posición",+ "captions.readingTheSound": "Leyendo el sonido del clip","captions.transcribing": "Transcribiendo","captions.typeWordsPutScreen": "Type the words to put on screen…","captions.useVoiceFromTimeline": "Usar la voz de la línea de tiempo",@@ -91,6 +92,7 @@"clipInspector.transitionInto": "Hacia {0}","clipInspector.treatments": "Tratamientos","clipInspector.volume": "Volumen",+ "common.aboutLeft": "Quedan unos {0}:{1}","common.adjust": "Ajustar","common.apply": "Aplicar","common.audio": "Audio",@@ -813,6 +815,7 @@"speech.importClipVoiceFirst": "Importa primero un clip con una voz.","speech.italian": "Italiano","speech.japanese": "Japonés",+ "speech.loadingTheModel": "Cargando el modelo de voz","speech.long": "larga","speech.longer": "más larga","speech.male": "masculina",@@ -826,6 +829,7 @@"speech.pickSampleVoice": "Elige una muestra con una voz","speech.portuguese": "Portugués","speech.quick": "Rápido",+ "speech.readingTheSample": "Leyendo la grabación de voz","speech.readsAnyVoiceFew": "Lee con cualquier voz a partir de unos segundos de una grabación: una de las incluidas o una muestra de la biblioteca de medios.","speech.readsVoiceHeardClip": "Lee con la voz que se oye en el clip seleccionado en la línea de tiempo","speech.readsVoiceHeardRecording": "Lee con la voz que se oye en una grabación de la biblioteca de medios. El modelo escucha los diez primeros segundos desde el punto elegido abajo.",diff --git a/src/crates/concat/locales/fa.json b/src/crates/concat/locales/fa.jsonindex 0b059a54..b0430f39 100644--- a/src/crates/concat/locales/fa.json+++ b/src/crates/concat/locales/fa.json@@ -17,6 +17,7 @@"captions.oneTitlePerPhrase": "برای هر Phrase گفتهشده یک عنوان ساخته میشود، با Timing خود کلمات، روی اولین لاین دارای فضای کافی.","captions.oneTitlePerSentence": "برای هر جمله یک عنوان ساخته میشود و بهاندازه زمان لازم برای خواندن نمایش داده میشود؛ پشت سر هم روی اولین لاین دارای فضای کافی.","captions.placement": "جایگذاری",+ "captions.readingTheSound": "در حال خواندن صدای کلیپ","captions.transcribing": "در حال رونویسی","captions.typeWordsPutScreen": "متنی را که باید روی صفحه نمایش داده شود وارد کنید…","captions.useVoiceFromTimeline": "استفاده از صدای خط زمان",@@ -91,6 +92,7 @@"clipInspector.transitionInto": "به {0}","clipInspector.treatments": "پردازشها","clipInspector.volume": "ولوم",+ "common.aboutLeft": "حدود {0}:{1} مانده","common.adjust": "تنظیم","common.apply": "اعمال","common.audio": "صدا",@@ -813,6 +815,7 @@"speech.importClipVoiceFirst": "ابتدا کلیپی را که صدایی در آن هست وارد کنید.","speech.italian": "ایتالیایی","speech.japanese": "ژاپنی",+ "speech.loadingTheModel": "در حال بارگذاری مدل صدا","speech.long": "طولانی","speech.longer": "طولانیتر","speech.male": "مرد",@@ -826,6 +829,7 @@"speech.pickSampleVoice": "نمونهای را که صدایی در آن هست انتخاب کنید","speech.portuguese": "پرتغالی","speech.quick": "سریع",+ "speech.readingTheSample": "در حال خواندن ضبط صدا","speech.readsAnyVoiceFew": "با هر صدایی از چند ثانیه ضبط میخواند: یکی از ضبطهای همراه خودش، یا یک نمونه از Bin.","speech.readsVoiceHeardClip": "با صدایی که در کلیپ انتخابشده روی تایملاین شنیده میشود میخواند","speech.readsVoiceHeardRecording": "با صدایی که در یک ضبط از Bin شنیده میشود میخواند. مدل به ده ثانیه اول از نقطه انتخابشده در پایین گوش میدهد.",diff --git a/src/crates/concat/locales/fr.json b/src/crates/concat/locales/fr.jsonindex 8a0b82f3..cc18ea3a 100644--- a/src/crates/concat/locales/fr.json+++ b/src/crates/concat/locales/fr.json@@ -17,6 +17,7 @@"captions.oneTitlePerPhrase": "Un titre par phrase prononcée, calé sur le rythme des mots, sur la première piste libre.","captions.oneTitlePerSentence": "One title per sentence, held for as long as it takes to read, one after another on the first lane with room.","captions.placement": "Position",+ "captions.readingTheSound": "Lecture du son du clip","captions.transcribing": "Transcription en cours","captions.typeWordsPutScreen": "Type the words to put on screen…","captions.useVoiceFromTimeline": "Utiliser la voix de la timeline",@@ -91,6 +92,7 @@"clipInspector.transitionInto": "Vers {0}","clipInspector.treatments": "Traitements","clipInspector.volume": "Volume",+ "common.aboutLeft": "Encore environ {0}:{1}","common.adjust": "Réglages","common.apply": "Appliquer","common.audio": "Audio",@@ -813,6 +815,7 @@"speech.importClipVoiceFirst": "Importez d'abord un clip contenant une voix.","speech.italian": "Italien","speech.japanese": "Japonais",+ "speech.loadingTheModel": "Chargement du modèle de voix","speech.long": "longues","speech.longer": "plus longues","speech.male": "masculine",@@ -826,6 +829,7 @@"speech.pickSampleVoice": "Choisissez un échantillon contenant une voix","speech.portuguese": "Portugais","speech.quick": "Rapide",+ "speech.readingTheSample": "Lecture de l'enregistrement de voix","speech.readsAnyVoiceFew": "Lit avec n'importe quelle voix à partir de quelques secondes d'un enregistrement : l'un de ceux qu'il embarque, ou un échantillon du chutier.","speech.readsVoiceHeardClip": "Lit avec la voix entendue dans le clip sélectionné sur la timeline","speech.readsVoiceHeardRecording": "Lit avec la voix entendue dans un enregistrement du chutier. Les dix premières secondes à partir du point choisi ci-dessous sont ce que le modèle écoute.",diff --git a/src/crates/concat/locales/he.json b/src/crates/concat/locales/he.jsonindex b23a4954..d087c5b1 100644--- a/src/crates/concat/locales/he.json+++ b/src/crates/concat/locales/he.json@@ -17,6 +17,7 @@"captions.oneTitlePerPhrase": "כותרת אחת לכל ביטוי שנאמר, חתוכה לפי תזמון המילים עצמן, בערוץ הראשון שיש בו מקום.","captions.oneTitlePerSentence": "כותרת אחת לכל משפט, מוצגת כל עוד צריך כדי לקרוא אותה, בזו אחר זו בערוץ הראשון שיש בו מקום.","captions.placement": "מיקום",+ "captions.readingTheSound": "קורא את הצליל של הקליפ","captions.transcribing": "מתמלל","captions.typeWordsPutScreen": "יש להקליד את המילים שיופיעו על המסך…","captions.useVoiceFromTimeline": "שימוש בקול מציר הזמן",@@ -91,6 +92,7 @@"clipInspector.transitionInto": "אל {0}","clipInspector.treatments": "טיפולים","clipInspector.volume": "עוצמת קול",+ "common.aboutLeft": "נותרו כ-{0}:{1}","common.adjust": "כוונון","common.apply": "החלה","common.audio": "שמע",@@ -813,6 +815,7 @@"speech.importClipVoiceFirst": "יש לייבא קודם קליפ שיש בו קול.","speech.italian": "איטלקית","speech.japanese": "יפנית",+ "speech.loadingTheModel": "טוען את מודל הקול","speech.long": "ארוכות","speech.longer": "ארוכות יותר","speech.male": "זכר",@@ -826,6 +829,7 @@"speech.pickSampleVoice": "בחירת דגימה שיש בה קול","speech.portuguese": "פורטוגזית","speech.quick": "מהיר",+ "speech.readingTheSample": "קורא את הקלטת הקול","speech.readsAnyVoiceFew": "קורא בכל קול מכמה שניות של הקלטה: אחת שמגיעה איתו, או דגימה מהמאגר.","speech.readsVoiceHeardClip": "קורא בקול שנשמע בקליפ שנבחר בציר הזמן","speech.readsVoiceHeardRecording": "קורא בקול שנשמע בהקלטה מהמאגר. עשר השניות הראשונות מהנקודה שנבחרה למטה הן מה שהמודל מקשיב לו.",diff --git a/src/crates/concat/locales/hi.json b/src/crates/concat/locales/hi.jsonindex 92fe0a0e..82d36721 100644--- a/src/crates/concat/locales/hi.json+++ b/src/crates/concat/locales/hi.json@@ -17,6 +17,7 @@"captions.oneTitlePerPhrase": "बोले गए हर वाक्यांश के लिए एक टाइटल, शब्दों की अपनी टाइमिंग पर कटा हुआ, खाली जगह वाली पहली लेन पर।","captions.oneTitlePerSentence": "हर वाक्य के लिए एक टाइटल, जितनी देर पढ़ने में लगे उतनी देर तक, एक के बाद एक, खाली जगह वाली पहली लेन पर।","captions.placement": "स्थान",+ "captions.readingTheSound": "क्लिप की आवाज़ पढ़ी जा रही है","captions.transcribing": "ट्रांसक्राइब हो रहा है","captions.typeWordsPutScreen": "स्क्रीन पर दिखाने के लिए शब्द लिखें…","captions.useVoiceFromTimeline": "टाइमलाइन की आवाज़ इस्तेमाल करें",@@ -91,6 +92,7 @@"clipInspector.transitionInto": "{0} में","clipInspector.treatments": "ऑडियो सुधार","clipInspector.volume": "वॉल्यूम",+ "common.aboutLeft": "लगभग {0}:{1} बाकी","common.adjust": "समायोजन","common.apply": "लागू करें","common.audio": "ऑडियो",@@ -813,6 +815,7 @@"speech.importClipVoiceFirst": "पहले आवाज़ वाली कोई क्लिप इंपोर्ट करें।","speech.italian": "इतालवी","speech.japanese": "जापानी",+ "speech.loadingTheModel": "आवाज़ मॉडल लोड हो रहा है","speech.long": "लंबे","speech.longer": "और लंबे","speech.male": "पुरुष",@@ -826,6 +829,7 @@"speech.pickSampleVoice": "आवाज़ वाला कोई नमूना चुनें","speech.portuguese": "पुर्तगाली","speech.quick": "तेज़",+ "speech.readingTheSample": "आवाज़ की रिकॉर्डिंग पढ़ी जा रही है","speech.readsAnyVoiceFew": "रिकॉर्डिंग के कुछ सेकंड से किसी भी आवाज़ में पढ़ता है: साथ आई किसी रिकॉर्डिंग से, या बिन के किसी नमूने से।","speech.readsVoiceHeardClip": "टाइमलाइन पर चुनी गई क्लिप में सुनाई देने वाली आवाज़ में पढ़ता है","speech.readsVoiceHeardRecording": "बिन की किसी रिकॉर्डिंग में सुनाई देने वाली आवाज़ में पढ़ता है। नीचे चुने गए बिंदु से पहले दस सेकंड वह हिस्सा हैं जिसे मॉडल सुनता है।",diff --git a/src/crates/concat/locales/hr.json b/src/crates/concat/locales/hr.jsonindex ae2f6e52..f825f515 100644--- a/src/crates/concat/locales/hr.json+++ b/src/crates/concat/locales/hr.json@@ -17,6 +17,7 @@"captions.oneTitlePerPhrase": "Jedan naslov po izgovorenoj frazi, rezan na vlastiti tajming riječi, na prvoj traci s mjesta.","captions.oneTitlePerSentence": "Jedan naslov po rečenici, držan dok se ne pročita, jedan za drugim na prvoj traci s mjesta.","captions.placement": "Smještaj",+ "captions.readingTheSound": "Čitanje zvuka isječka","captions.transcribing": "Transkripcija","captions.typeWordsPutScreen": "Upišite riječi za prikaz na zaslonu…","captions.useVoiceFromTimeline": "Koristi glas s vremenske crte",@@ -91,6 +92,7 @@"clipInspector.transitionInto": "U {0}","clipInspector.treatments": "Tretmani","clipInspector.volume": "Glasnoća",+ "common.aboutLeft": "Još oko {0}:{1}","common.adjust": "Prilagodi","common.apply": "Primijeni","common.audio": "Zvuk",@@ -813,6 +815,7 @@"speech.importClipVoiceFirst": "Prvo uvezite klip u kojem je glas.","speech.italian": "talijanski","speech.japanese": "japanski",+ "speech.loadingTheModel": "Učitavanje modela glasa","speech.long": "dugo","speech.longer": "duže","speech.male": "muški",@@ -826,6 +829,7 @@"speech.pickSampleVoice": "Odaberite uzorak u kojem je glas","speech.portuguese": "portugalski","speech.quick": "Brzo",+ "speech.readingTheSample": "Čitanje snimke glasa","speech.readsAnyVoiceFew": "Čita bilo kojim glasom iz nekoliko sekundi snimke: one koja dolazi s njim ili uzorka iz spremnika.","speech.readsVoiceHeardClip": "Čita glasom koji se čuje u klipu odabranom na vremenskoj liniji","speech.readsVoiceHeardRecording": "Čita glasom koji se čuje u snimci iz spremnika. Model sluša prvih deset sekundi od točke odabrane ispod.",diff --git a/src/crates/concat/locales/id.json b/src/crates/concat/locales/id.jsonindex 3ace0c43..1eccfb15 100644--- a/src/crates/concat/locales/id.json+++ b/src/crates/concat/locales/id.json@@ -17,6 +17,7 @@"captions.oneTitlePerPhrase": "Satu judul untuk setiap frasa yang diucapkan, dipotong mengikuti waktu kata-katanya, di lajur pertama yang masih lowong.","captions.oneTitlePerSentence": "Satu judul untuk setiap kalimat, ditampilkan selama waktu yang dibutuhkan untuk membacanya, berurutan di lajur pertama yang masih lowong.","captions.placement": "Penempatan",+ "captions.readingTheSound": "Membaca suara klip","captions.transcribing": "Mentranskripsi","captions.typeWordsPutScreen": "Ketik kata-kata yang akan tampil di layar…","captions.useVoiceFromTimeline": "Gunakan suara dari linimasa",@@ -91,6 +92,7 @@"clipInspector.transitionInto": "Ke {0}","clipInspector.treatments": "Perbaikan audio","clipInspector.volume": "Volume",+ "common.aboutLeft": "Sekitar {0}:{1} lagi","common.adjust": "Sesuaikan","common.apply": "Terapkan","common.audio": "Audio",@@ -813,6 +815,7 @@"speech.importClipVoiceFirst": "Impor dulu klip yang berisi suara.","speech.italian": "Italia","speech.japanese": "Jepang",+ "speech.loadingTheModel": "Memuat model suara","speech.long": "panjang","speech.longer": "lebih panjang","speech.male": "laki-laki",@@ -826,6 +829,7 @@"speech.pickSampleVoice": "Pilih sampel yang berisi suara","speech.portuguese": "Portugis","speech.quick": "Cepat",+ "speech.readingTheSample": "Membaca rekaman suara","speech.readsAnyVoiceFew": "Membaca dengan suara apa pun dari beberapa detik rekaman: rekaman bawaannya, atau sampel dari bin.","speech.readsVoiceHeardClip": "Membaca dengan suara yang terdengar di klip yang dipilih di linimasa","speech.readsVoiceHeardRecording": "Membaca dengan suara yang terdengar di rekaman dari bin. Sepuluh detik pertama dari titik yang dipilih di bawah adalah bagian yang didengarkan model.",diff --git a/src/crates/concat/locales/it.json b/src/crates/concat/locales/it.jsonindex 0161acc2..76ba8004 100644--- a/src/crates/concat/locales/it.json+++ b/src/crates/concat/locales/it.json@@ -17,6 +17,7 @@"captions.oneTitlePerPhrase": "Un titolo per ogni frase pronunciata, tagliato sul ritmo delle parole, sulla prima traccia libera.","captions.oneTitlePerSentence": "One title per sentence, held for as long as it takes to read, one after another on the first lane with room.","captions.placement": "Posizione",+ "captions.readingTheSound": "Lettura del suono della clip","captions.transcribing": "Trascrizione in corso","captions.typeWordsPutScreen": "Type the words to put on screen…","captions.useVoiceFromTimeline": "Usa la voce dalla timeline",@@ -91,6 +92,7 @@"clipInspector.transitionInto": "Verso {0}","clipInspector.treatments": "Trattamenti","clipInspector.volume": "Volume",+ "common.aboutLeft": "Mancano circa {0}:{1}","common.adjust": "Regola","common.apply": "Applica","common.audio": "Audio",@@ -813,6 +815,7 @@"speech.importClipVoiceFirst": "Importa prima una clip con una voce.","speech.italian": "Italiano","speech.japanese": "Giapponese",+ "speech.loadingTheModel": "Caricamento del modello vocale","speech.long": "lunghe","speech.longer": "più lunghe","speech.male": "maschile",@@ -826,6 +829,7 @@"speech.pickSampleVoice": "Scegli un campione con una voce","speech.portuguese": "Portoghese","speech.quick": "Rapida",+ "speech.readingTheSample": "Lettura della registrazione vocale","speech.readsAnyVoiceFew": "Legge con qualsiasi voce a partire da pochi secondi di una registrazione: una fornita con il modello, o un campione dal pannello Media.","speech.readsVoiceHeardClip": "Legge con la voce che si sente nella clip selezionata sulla timeline","speech.readsVoiceHeardRecording": "Legge con la voce che si sente in una registrazione del pannello Media. Il modello ascolta i primi dieci secondi dal punto scelto qui sotto.",diff --git a/src/crates/concat/locales/ja.json b/src/crates/concat/locales/ja.jsonindex 11da7af1..2a83f8c1 100644--- a/src/crates/concat/locales/ja.json+++ b/src/crates/concat/locales/ja.json@@ -17,6 +17,7 @@"captions.oneTitlePerPhrase": "発話されたフレーズごとにタイトルを一つ、言葉のタイミングどおりに、空いている最初のレーンへ。","captions.oneTitlePerSentence": "一文ごとにタイトルを一つ、読み終えるのに必要な時間だけ表示し、空いている最初のレーンに順番に並べます。","captions.placement": "配置",+ "captions.readingTheSound": "クリップの音声を読み込み中","captions.transcribing": "文字起こし中","captions.typeWordsPutScreen": "画面に表示する言葉を入力…","captions.useVoiceFromTimeline": "タイムラインの音声を使う",@@ -91,6 +92,7 @@"clipInspector.transitionInto": "{0} へ","clipInspector.treatments": "処理","clipInspector.volume": "音量",+ "common.aboutLeft": "残り約 {0}:{1}","common.adjust": "調整","common.apply": "適用","common.audio": "オーディオ",@@ -813,6 +815,7 @@"speech.importClipVoiceFirst": "まず声の入ったクリップを読み込んでください。","speech.italian": "イタリア語","speech.japanese": "日本語",+ "speech.loadingTheModel": "音声モデルを読み込み中","speech.long": "長い","speech.longer": "より長い","speech.male": "男性",@@ -826,6 +829,7 @@"speech.pickSampleVoice": "声の入ったサンプルを選んでください","speech.portuguese": "ポルトガル語","speech.quick": "クイック",+ "speech.readingTheSample": "声の録音を読み込み中","speech.readsAnyVoiceFew": "数秒の録音からどんな声でも読み上げます : 付属の録音か、ビンのサンプルから。","speech.readsVoiceHeardClip": "タイムラインで選択したクリップに聞こえる声で読み上げます","speech.readsVoiceHeardRecording": "ビンの録音に聞こえる声で読み上げます。モデルが聞くのは、下で選んだ位置から最初の 10 秒です。",diff --git a/src/crates/concat/locales/ko.json b/src/crates/concat/locales/ko.jsonindex db9be476..b93f7b57 100644--- a/src/crates/concat/locales/ko.json+++ b/src/crates/concat/locales/ko.json@@ -17,6 +17,7 @@"captions.oneTitlePerPhrase": "말한 구절마다 자막 하나씩, 말의 타이밍에 맞춰, 자리가 있는 첫 레인에 놓습니다.","captions.oneTitlePerSentence": "One title per sentence, held for as long as it takes to read, one after another on the first lane with room.","captions.placement": "배치",+ "captions.readingTheSound": "클립 소리 읽는 중","captions.transcribing": "받아쓰는 중","captions.typeWordsPutScreen": "Type the words to put on screen…","captions.useVoiceFromTimeline": "타임라인의 음성 사용",@@ -91,6 +92,7 @@"clipInspector.transitionInto": "{0}(으)로","clipInspector.treatments": "처리","clipInspector.volume": "볼륨",+ "common.aboutLeft": "약 {0}:{1} 남음","common.adjust": "조정","common.apply": "적용","common.audio": "오디오",@@ -813,6 +815,7 @@"speech.importClipVoiceFirst": "먼저 목소리가 담긴 클립을 가져오세요.","speech.italian": "이탈리아어","speech.japanese": "일본어",+ "speech.loadingTheModel": "음성 모델 불러오는 중","speech.long": "길게","speech.longer": "더 길게","speech.male": "남성",@@ -826,6 +829,7 @@"speech.pickSampleVoice": "목소리가 담긴 샘플을 선택하세요","speech.portuguese": "포르투갈어","speech.quick": "빠름",+ "speech.readingTheSample": "목소리 녹음 읽는 중","speech.readsAnyVoiceFew": "녹음 몇 초만 있으면 어떤 목소리로든 읽습니다: 딸려 오는 녹음이나 미디어 빈의 샘플.","speech.readsVoiceHeardClip": "타임라인에서 선택한 클립 속 목소리로 읽습니다","speech.readsVoiceHeardRecording": "미디어 빈에 있는 녹음 속 목소리로 읽습니다. 아래에서 고른 지점부터 10초 동안을 모델이 듣습니다.",diff --git a/src/crates/concat/locales/nl.json b/src/crates/concat/locales/nl.jsonindex 5e6b663e..6d242dc8 100644--- a/src/crates/concat/locales/nl.json+++ b/src/crates/concat/locales/nl.json@@ -17,6 +17,7 @@"captions.oneTitlePerPhrase": "Eén titel per gesproken zin, getimed op de woorden zelf, op het eerste spoor met ruimte.","captions.oneTitlePerSentence": "Eén titel per zin, zo lang in beeld als nodig is om hem te lezen, na elkaar op het eerste spoor met ruimte.","captions.placement": "Plaatsing",+ "captions.readingTheSound": "Geluid van de clip lezen","captions.transcribing": "Transcriberen","captions.typeWordsPutScreen": "Typ de woorden die in beeld moeten komen…","captions.useVoiceFromTimeline": "Stem uit de tijdlijn gebruiken",@@ -91,6 +92,7 @@"clipInspector.transitionInto": "Naar {0}","clipInspector.treatments": "Bewerkingen","clipInspector.volume": "Volume",+ "common.aboutLeft": "Nog ongeveer {0}:{1}","common.adjust": "Aanpassen","common.apply": "Toepassen","common.audio": "Audio",@@ -813,6 +815,7 @@"speech.importClipVoiceFirst": "Importeer eerst een clip waarin een stem te horen is.","speech.italian": "Italiaans","speech.japanese": "Japans",+ "speech.loadingTheModel": "Stemmodel laden","speech.long": "lang","speech.longer": "langer","speech.male": "man",@@ -826,6 +829,7 @@"speech.pickSampleVoice": "Kies een sample met een stem erin","speech.portuguese": "Portugees","speech.quick": "Snel",+ "speech.readingTheSample": "Stemopname lezen","speech.readsAnyVoiceFew": "Leest met elke stem op basis van een paar seconden opname: een meegeleverde, of een sample uit de mediabak.","speech.readsVoiceHeardClip": "Leest met de stem die te horen is in de geselecteerde clip op de tijdlijn","speech.readsVoiceHeardRecording": "Leest met de stem die te horen is in een opname uit de mediabak. Het model luistert naar de eerste tien seconden vanaf het hieronder gekozen punt.",diff --git a/src/crates/concat/locales/pl.json b/src/crates/concat/locales/pl.jsonindex 4c9a75e9..b0aa9255 100644--- a/src/crates/concat/locales/pl.json+++ b/src/crates/concat/locales/pl.json@@ -17,6 +17,7 @@"captions.oneTitlePerPhrase": "Jeden napis na każdą wypowiedzianą frazę, przycięty do rytmu samych słów, na pierwszej ścieżce z wolnym miejscem.","captions.oneTitlePerSentence": "Jeden napis na zdanie, widoczny tak długo, jak trzeba, by go przeczytać, jeden po drugim na pierwszej ścieżce z wolnym miejscem.","captions.placement": "Położenie",+ "captions.readingTheSound": "Odczytywanie dźwięku klipu","captions.transcribing": "Transkrypcja","captions.typeWordsPutScreen": "Wpisz słowa, które pojawią się na ekranie…","captions.useVoiceFromTimeline": "Użyj głosu z osi czasu",@@ -91,6 +92,7 @@"clipInspector.transitionInto": "W: {0}","clipInspector.treatments": "Obróbka","clipInspector.volume": "Głośność",+ "common.aboutLeft": "Zostało około {0}:{1}","common.adjust": "Korekta","common.apply": "Zastosuj","common.audio": "Audio",@@ -813,6 +815,7 @@"speech.importClipVoiceFirst": "Najpierw zaimportuj klip z głosem.","speech.italian": "włoski","speech.japanese": "japoński",+ "speech.loadingTheModel": "Ładowanie modelu głosu","speech.long": "długie","speech.longer": "dłuższe","speech.male": "mężczyzna",@@ -826,6 +829,7 @@"speech.pickSampleVoice": "Wybierz próbkę z głosem","speech.portuguese": "portugalski","speech.quick": "Szybko",+ "speech.readingTheSample": "Odczytywanie nagrania głosu","speech.readsAnyVoiceFew": "Czyta dowolnym głosem na podstawie kilku sekund nagrania: dołączonego albo próbki z pojemnika.","speech.readsVoiceHeardClip": "Czyta głosem słyszanym w klipie zaznaczonym na osi czasu","speech.readsVoiceHeardRecording": "Czyta głosem słyszanym w nagraniu z pojemnika. Model słucha pierwszych dziesięciu sekund od wybranego poniżej miejsca.",diff --git a/src/crates/concat/locales/pt-BR.json b/src/crates/concat/locales/pt-BR.jsonindex 5ae6e433..d890b1db 100644--- a/src/crates/concat/locales/pt-BR.json+++ b/src/crates/concat/locales/pt-BR.json@@ -17,6 +17,7 @@"captions.oneTitlePerPhrase": "Um título por frase falada, no ritmo das palavras, na primeira faixa com espaço.","captions.oneTitlePerSentence": "One title per sentence, held for as long as it takes to read, one after another on the first lane with room.","captions.placement": "Posição",+ "captions.readingTheSound": "Lendo o som do clipe","captions.transcribing": "Transcrevendo","captions.typeWordsPutScreen": "Type the words to put on screen…","captions.useVoiceFromTimeline": "Usar a voz da linha do tempo",@@ -91,6 +92,7 @@"clipInspector.transitionInto": "Para {0}","clipInspector.treatments": "Tratamentos","clipInspector.volume": "Volume",+ "common.aboutLeft": "Faltam cerca de {0}:{1}","common.adjust": "Ajustar","common.apply": "Aplicar","common.audio": "Áudio",@@ -813,6 +815,7 @@"speech.importClipVoiceFirst": "Importe primeiro um clipe com uma voz.","speech.italian": "Italiano","speech.japanese": "Japonês",+ "speech.loadingTheModel": "Carregando o modelo de voz","speech.long": "longo","speech.longer": "mais longo","speech.male": "masculina",@@ -826,6 +829,7 @@"speech.pickSampleVoice": "Escolha uma amostra com uma voz","speech.portuguese": "Português","speech.quick": "Rápido",+ "speech.readingTheSample": "Lendo a gravação de voz","speech.readsAnyVoiceFew": "Lê em qualquer voz a partir de alguns segundos de uma gravação: uma que vem com ele, ou uma amostra da biblioteca.","speech.readsVoiceHeardClip": "Lê na voz ouvida no clipe selecionado na linha do tempo","speech.readsVoiceHeardRecording": "Lê na voz ouvida numa gravação da biblioteca. Os primeiros dez segundos a partir do ponto escolhido abaixo são o que o modelo escuta.",diff --git a/src/crates/concat/locales/ru.json b/src/crates/concat/locales/ru.jsonindex bb5ac03c..8d366535 100644--- a/src/crates/concat/locales/ru.json+++ b/src/crates/concat/locales/ru.json@@ -17,6 +17,7 @@"captions.oneTitlePerPhrase": "Один титр на каждую произнесённую фразу, в такт словам, на первой свободной дорожке.","captions.oneTitlePerSentence": "Один титр на предложение, держится столько, сколько нужно, чтобы прочитать, один за другим на первой свободной дорожке.","captions.placement": "Расположение",+ "captions.readingTheSound": "Чтение звука клипа","captions.transcribing": "Распознавание","captions.typeWordsPutScreen": "Введите слова, которые появятся на экране…","captions.useVoiceFromTimeline": "Использовать голос с таймлайна",@@ -91,6 +92,7 @@"clipInspector.transitionInto": "В {0}","clipInspector.treatments": "Обработка","clipInspector.volume": "Громкость",+ "common.aboutLeft": "Осталось около {0}:{1}","common.adjust": "Коррекция","common.apply": "Применить","common.audio": "Аудио",@@ -813,6 +815,7 @@"speech.importClipVoiceFirst": "Сначала импортируйте клип с голосом.","speech.italian": "Итальянский","speech.japanese": "Японский",+ "speech.loadingTheModel": "Загрузка модели голоса","speech.long": "длинные","speech.longer": "ещё длиннее","speech.male": "мужской",@@ -826,6 +829,7 @@"speech.pickSampleVoice": "Выберите образец с голосом","speech.portuguese": "Португальский","speech.quick": "Быстрое",+ "speech.readingTheSample": "Чтение записи голоса","speech.readsAnyVoiceFew": "Читает любым голосом по нескольким секундам записи: из комплекта или из образца в медиа.","speech.readsVoiceHeardClip": "Читает голосом, звучащим в клипе, выбранном на таймлайне","speech.readsVoiceHeardRecording": "Читает голосом, звучащим в записи из медиа. Модель слушает первые десять секунд от точки, выбранной ниже.",diff --git a/src/crates/concat/locales/th.json b/src/crates/concat/locales/th.jsonindex 8bab5410..18b0df3b 100644--- a/src/crates/concat/locales/th.json+++ b/src/crates/concat/locales/th.json@@ -17,6 +17,7 @@"captions.oneTitlePerPhrase": "ไตเติลหนึ่งรายการต่อหนึ่งวลีที่พูด ตัดตามจังหวะของคำ วางบนเลนแรกที่มีที่ว่าง","captions.oneTitlePerSentence": "ไตเติลหนึ่งรายการต่อหนึ่งประโยค แสดงค้างไว้นานพอให้อ่านทัน เรียงต่อกันบนเลนแรกที่มีที่ว่าง","captions.placement": "ตำแหน่งที่วาง",+ "captions.readingTheSound": "กำลังอ่านเสียงของคลิป","captions.transcribing": "กำลังถอดเสียง","captions.typeWordsPutScreen": "พิมพ์ข้อความที่จะแสดงบนจอ…","captions.useVoiceFromTimeline": "ใช้เสียงพูดจากไทม์ไลน์",@@ -91,6 +92,7 @@"clipInspector.transitionInto": "เข้าสู่ {0}","clipInspector.treatments": "การปรับปรุงเสียง","clipInspector.volume": "ระดับเสียง",+ "common.aboutLeft": "เหลืออีกประมาณ {0}:{1}","common.adjust": "ปรับแต่ง","common.apply": "นำไปใช้","common.audio": "เสียง",@@ -813,6 +815,7 @@"speech.importClipVoiceFirst": "นำเข้าคลิปที่มีเสียงพูดก่อน","speech.italian": "อิตาลี","speech.japanese": "ญี่ปุ่น",+ "speech.loadingTheModel": "กำลังโหลดโมเดลเสียง","speech.long": "ยาว","speech.longer": "ยาวขึ้น","speech.male": "ชาย",@@ -826,6 +829,7 @@"speech.pickSampleVoice": "เลือกตัวอย่างที่มีเสียงพูด","speech.portuguese": "โปรตุเกส","speech.quick": "เร็ว",+ "speech.readingTheSample": "กำลังอ่านไฟล์บันทึกเสียง","speech.readsAnyVoiceFew": "อ่านด้วยเสียงใดก็ได้จากไฟล์บันทึกเพียงไม่กี่วินาที: ไฟล์ที่มาพร้อมกัน หรือตัวอย่างจากคลังสื่อ","speech.readsVoiceHeardClip": "อ่านด้วยเสียงที่ได้ยินในคลิปที่เลือกบนไทม์ไลน์","speech.readsVoiceHeardRecording": "อ่านด้วยเสียงที่ได้ยินในไฟล์บันทึกจากคลังสื่อ โมเดลจะฟังสิบวินาทีแรกนับจากจุดที่เลือกด้านล่าง",diff --git a/src/crates/concat/locales/tr.json b/src/crates/concat/locales/tr.jsonindex 7dbc9757..de7062bf 100644--- a/src/crates/concat/locales/tr.json+++ b/src/crates/concat/locales/tr.json@@ -17,6 +17,7 @@"captions.oneTitlePerPhrase": "Söylenen her cümle için bir yazı, kelimelerin kendi zamanlamasıyla, yeri olan ilk şeritte.","captions.oneTitlePerSentence": "One title per sentence, held for as long as it takes to read, one after another on the first lane with room.","captions.placement": "Yerleşim",+ "captions.readingTheSound": "Klibin sesi okunuyor","captions.transcribing": "Yazıya dökülüyor","captions.typeWordsPutScreen": "Type the words to put on screen…","captions.useVoiceFromTimeline": "Zaman çizelgesindeki sesi kullan",@@ -91,6 +92,7 @@"clipInspector.transitionInto": "{0} klibine","clipInspector.treatments": "İşlemler","clipInspector.volume": "Ses düzeyi",+ "common.aboutLeft": "Yaklaşık {0}:{1} kaldı","common.adjust": "Ayarla","common.apply": "Uygula","common.audio": "Ses",@@ -813,6 +815,7 @@"speech.importClipVoiceFirst": "Önce içinde ses olan bir klip içe aktarın.","speech.italian": "İtalyanca","speech.japanese": "Japonca",+ "speech.loadingTheModel": "Ses modeli yükleniyor","speech.long": "uzun","speech.longer": "daha uzun","speech.male": "erkek",@@ -826,6 +829,7 @@"speech.pickSampleVoice": "İçinde ses olan bir örnek seçin","speech.portuguese": "Portekizce","speech.quick": "Hızlı",+ "speech.readingTheSample": "Ses kaydı okunuyor","speech.readsAnyVoiceFew": "Bir kaydın birkaç saniyesinden herhangi bir sesle okur: beraberinde gelen bir kayıt ya da medya kutusundan bir örnek.","speech.readsVoiceHeardClip": "Zaman çizelgesinde seçili klipte duyulan sesle okur","speech.readsVoiceHeardRecording": "Medya kutusundaki bir kayıtta duyulan sesle okur. Model, aşağıda seçilen noktadan itibaren ilk on saniyeyi dinler.",diff --git a/src/crates/concat/locales/uk.json b/src/crates/concat/locales/uk.jsonindex 103293ce..94c9a1c3 100644--- a/src/crates/concat/locales/uk.json+++ b/src/crates/concat/locales/uk.json@@ -17,6 +17,7 @@"captions.oneTitlePerPhrase": "Один титр на кожну вимовлену фразу, точно за таймінгом слів, на першій вільній доріжці.","captions.oneTitlePerSentence": "Один титр на речення, рівно стільки, скільки треба, щоб його прочитати, один за одним на першій вільній доріжці.","captions.placement": "Розташування",+ "captions.readingTheSound": "Читання звуку кліпу","captions.transcribing": "Розпізнавання","captions.typeWordsPutScreen": "Введіть слова, які з’являться на екрані…","captions.useVoiceFromTimeline": "Використати голос із часової шкали",@@ -91,6 +92,7 @@"clipInspector.transitionInto": "У {0}","clipInspector.treatments": "Обробка","clipInspector.volume": "Гучність",+ "common.aboutLeft": "Залишилось близько {0}:{1}","common.adjust": "Корекція","common.apply": "Застосувати","common.audio": "Аудіо",@@ -813,6 +815,7 @@"speech.importClipVoiceFirst": "Спершу імпортуйте кліп із голосом.","speech.italian": "італійський","speech.japanese": "японський",+ "speech.loadingTheModel": "Завантаження моделі голосу","speech.long": "довгі","speech.longer": "довші","speech.male": "чоловічий",@@ -826,6 +829,7 @@"speech.pickSampleVoice": "Виберіть зразок із голосом","speech.portuguese": "португальський","speech.quick": "Швидко",+ "speech.readingTheSample": "Читання запису голосу","speech.readsAnyVoiceFew": "Читає будь-яким голосом за кількома секундами запису: вбудованим або зразком із медіатеки.","speech.readsVoiceHeardClip": "Читає голосом, який звучить у вибраному на часовій шкалі кліпі","speech.readsVoiceHeardRecording": "Читає голосом, який звучить у записі з медіатеки. Модель слухає перші десять секунд від вибраної нижче точки.",diff --git a/src/crates/concat/locales/ur.json b/src/crates/concat/locales/ur.jsonindex 3f02197c..047ff593 100644--- a/src/crates/concat/locales/ur.json+++ b/src/crates/concat/locales/ur.json@@ -17,6 +17,7 @@"captions.oneTitlePerPhrase": "ہر بولے گئے فقرے کے لیے ایک ٹائٹل، الفاظ کی اپنی ٹائمنگ کے مطابق کٹا ہوا، پہلی ایسی لین پر جس میں جگہ ہو۔","captions.oneTitlePerSentence": "ہر جملے کے لیے ایک ٹائٹل، جو پڑھنے میں لگنے والے وقت تک رہتا ہے، ایک کے بعد ایک پہلی ایسی لین پر جس میں جگہ ہو۔","captions.placement": "جگہ",+ "captions.readingTheSound": "کلپ کی آواز پڑھی جا رہی ہے","captions.transcribing": "ٹرانسکرائب ہو رہا ہے","captions.typeWordsPutScreen": "اسکرین پر دکھانے کے لیے الفاظ لکھیں…","captions.useVoiceFromTimeline": "ٹائم لائن کی آواز استعمال کریں",@@ -91,6 +92,7 @@"clipInspector.transitionInto": "{0} میں","clipInspector.treatments": "علاج","clipInspector.volume": "والیوم",+ "common.aboutLeft": "تقریباً {0}:{1} باقی","common.adjust": "ایڈجسٹ","common.apply": "لاگو کریں","common.audio": "آڈیو",@@ -813,6 +815,7 @@"speech.importClipVoiceFirst": "پہلے کوئی ایسا کلپ امپورٹ کریں جس میں آواز ہو۔","speech.italian": "اطالوی","speech.japanese": "جاپانی",+ "speech.loadingTheModel": "آواز کا ماڈل لوڈ ہو رہا ہے","speech.long": "لمبے","speech.longer": "زیادہ لمبے","speech.male": "مرد",@@ -826,6 +829,7 @@"speech.pickSampleVoice": "کوئی ایسا نمونہ چنیں جس میں آواز ہو","speech.portuguese": "پرتگالی","speech.quick": "تیز",+ "speech.readingTheSample": "آواز کی ریکارڈنگ پڑھی جا رہی ہے","speech.readsAnyVoiceFew": "کسی ریکارڈنگ کے چند سیکنڈ سے کسی بھی آواز میں پڑھتا ہے: ساتھ آنے والی کوئی ریکارڈنگ، یا بِن کا کوئی نمونہ۔","speech.readsVoiceHeardClip": "ٹائم لائن پر منتخب کلپ میں سنائی دینے والی آواز میں پڑھتا ہے","speech.readsVoiceHeardRecording": "بِن کی کسی ریکارڈنگ میں سنائی دینے والی آواز میں پڑھتا ہے۔ نیچے چنے گئے مقام سے پہلے دس سیکنڈ وہ ہیں جو ماڈل سنتا ہے۔",diff --git a/src/crates/concat/locales/vi.json b/src/crates/concat/locales/vi.jsonindex ac85e620..bbe24d6a 100644--- a/src/crates/concat/locales/vi.json+++ b/src/crates/concat/locales/vi.json@@ -17,6 +17,7 @@"captions.oneTitlePerPhrase": "Tạo một tiêu đề cho mỗi cụm từ được nói, căn theo thời điểm của từng từ và đặt trên track đầu tiên còn chỗ.","captions.oneTitlePerSentence": "Tạo một tiêu đề cho mỗi câu, giữ đủ lâu để người xem đọc, lần lượt trên track đầu tiên còn chỗ.","captions.placement": "Vị trí",+ "captions.readingTheSound": "Đang đọc âm thanh của clip","captions.transcribing": "Đang chuyển đổi","captions.typeWordsPutScreen": "Nhập các từ muốn hiển thị trên màn hình…","captions.useVoiceFromTimeline": "Dùng giọng nói từ dòng thời gian",@@ -91,6 +92,7 @@"clipInspector.transitionInto": "Sang {0}","clipInspector.treatments": "Xử lý hình ảnh","clipInspector.volume": "Âm lượng",+ "common.aboutLeft": "Còn khoảng {0}:{1}","common.adjust": "Điều chỉnh","common.apply": "Áp dụng","common.audio": "Âm thanh",@@ -813,6 +815,7 @@"speech.importClipVoiceFirst": "Trước tiên, hãy nhập clip có giọng nói.","speech.italian": "Ý","speech.japanese": "Nhật Bản",+ "speech.loadingTheModel": "Đang tải mô hình giọng nói","speech.long": "dài","speech.longer": "dài hơn","speech.male": "nam",@@ -826,6 +829,7 @@"speech.pickSampleVoice": "Chọn mẫu có giọng nói","speech.portuguese": "Bồ Đào Nha","speech.quick": "Nhanh",+ "speech.readingTheSample": "Đang đọc bản ghi giọng nói","speech.readsAnyVoiceFew": "Có thể đọc bằng bất kỳ giọng nào từ vài giây ghi âm: bản ghi đi kèm hoặc mẫu trong thư viện.","speech.readsVoiceHeardClip": "Đọc bằng giọng nghe được trong clip đã chọn trên dòng thời gian","speech.readsVoiceHeardRecording": "Đọc bằng giọng nghe được trong bản ghi âm ở thư viện. Mô hình sẽ nghe mười giây đầu tiên tính từ vị trí được chọn bên dưới.",diff --git a/src/crates/concat/locales/zh-Hans.json b/src/crates/concat/locales/zh-Hans.jsonindex ee442873..c05cf6b1 100644--- a/src/crates/concat/locales/zh-Hans.json+++ b/src/crates/concat/locales/zh-Hans.json@@ -17,6 +17,7 @@"captions.oneTitlePerPhrase": "每个口语短语一个标题,按词语本身的时间切分,放在第一条有空位的轨道上。","captions.oneTitlePerSentence": "每句一个标题,停留足够阅读的时长,依次排列在第一条有空位的轨道上。","captions.placement": "位置",+ "captions.readingTheSound": "正在读取片段的声音","captions.transcribing": "正在转录","captions.typeWordsPutScreen": "输入要显示在屏幕上的文字…","captions.useVoiceFromTimeline": "使用时间线中的语音",@@ -91,6 +92,7 @@"clipInspector.transitionInto": "进入 {0}","clipInspector.treatments": "处理方式","clipInspector.volume": "音量",+ "common.aboutLeft": "还剩约 {0}:{1}","common.adjust": "调整","common.apply": "应用","common.audio": "音频",@@ -813,6 +815,7 @@"speech.importClipVoiceFirst": "请先导入一个含有人声的片段。","speech.italian": "意大利语","speech.japanese": "日语",+ "speech.loadingTheModel": "正在加载语音模型","speech.long": "长","speech.longer": "更长","speech.male": "男声",@@ -826,6 +829,7 @@"speech.pickSampleVoice": "选择一段含有人声的样本","speech.portuguese": "葡萄牙语","speech.quick": "快速",+ "speech.readingTheSample": "正在读取声音录音","speech.readsAnyVoiceFew": "只需几秒录音,即可用任意声音朗读:可以是内置声音,也可以是媒体库中的样本。","speech.readsVoiceHeardClip": "用时间线上所选片段中的声音朗读","speech.readsVoiceHeardRecording": "用媒体库中某段录音里的声音朗读。模型会聆听从下方所选位置开始的前十秒。",diff --git a/src/crates/concat/locales/zh-TW.json b/src/crates/concat/locales/zh-TW.jsonindex 1e2f0c77..6c82d3a8 100644--- a/src/crates/concat/locales/zh-TW.json+++ b/src/crates/concat/locales/zh-TW.json@@ -17,6 +17,7 @@"captions.oneTitlePerPhrase": "每個口說片語一個標題,依字詞本身的時間切分,放在第一條有空位的軌道上。","captions.oneTitlePerSentence": "每句一個標題,停留足夠閱讀的時間,依序排列在第一條有空位的軌道上。","captions.placement": "位置",+ "captions.readingTheSound": "正在讀取片段的聲音","captions.transcribing": "正在轉錄","captions.typeWordsPutScreen": "輸入要顯示在螢幕上的文字…","captions.useVoiceFromTimeline": "使用時間軸中的語音",@@ -91,6 +92,7 @@"clipInspector.transitionInto": "進入 {0}","clipInspector.treatments": "處理方式","clipInspector.volume": "音量",+ "common.aboutLeft": "約剩 {0}:{1}","common.adjust": "調整","common.apply": "套用","common.audio": "音訊",@@ -813,6 +815,7 @@"speech.importClipVoiceFirst": "請先匯入一個含有人聲的片段。","speech.italian": "義大利文","speech.japanese": "日文",+ "speech.loadingTheModel": "正在載入語音模型","speech.long": "長","speech.longer": "更長","speech.male": "男聲",@@ -826,6 +829,7 @@"speech.pickSampleVoice": "選擇一段含有人聲的樣本","speech.portuguese": "葡萄牙語","speech.quick": "快速",+ "speech.readingTheSample": "正在讀取聲音錄音","speech.readsAnyVoiceFew": "只需幾秒錄音,即可用任意聲音朗讀:可以是內建聲音,也可以是媒體庫中的樣本。","speech.readsVoiceHeardClip": "用時間軸上所選片段中的聲音朗讀","speech.readsVoiceHeardRecording": "用媒體庫中某段錄音裡的聲音朗讀。模型會聆聽從下方所選位置開始的前十秒。",diff --git a/src/crates/concat/src/panes/captions.rs b/src/crates/concat/src/panes/captions.rsindex c3c8384d..f8198f97 100644--- a/src/crates/concat/src/panes/captions.rs+++ b/src/crates/concat/src/panes/captions.rs@@ -17,11 +17,13 @@ use std::sync::Arc;use concat_project::Command;use concat_project::model::TextStyle;+use concat_speech::JobStage;use concat_speech::transcribe::Segment;use crate::host::{on_ui_in_project, spawn_in_project};use crate::i18n::{t, tf};use crate::panes::Msg;+use crate::panes::pace::{Pace, Stage, Timings};use crate::panes::settings::installed;use crate::studio::Studio;use crate::ui::CaptionsSheetData;@@ -55,22 +57,31 @@ pub enum CaptionsMsg {/// Run the pass the sheet describes.Begin,Cancel,- /// The transcriber's worker reporting where it is, in percent.- Progress(i32),+ /// The transcriber's worker reporting the stage it is in.+ Progress(JobStage),/// The transcriber's worker is done: what was said, or why not.Finished(Result<Vec<Segment>, String>),}/// The clip a transcription is running over, as the finished segments/// need it: where it starts on the timeline and how fast it plays.-#[derive(Clone, Copy, Debug)]+#[derive(Clone, Debug)]struct Subject {start: f64,speed: f64,/// The look chosen when the run began.look: (f64, f64),+ /// The transcriber model, and the thirty-second windows whisper reads+ /// the sound in: what the run's timing is kept by.+ model: String,+ windows: f32,}+/// Seconds whisper takes over one thirty-second window, per megabyte of+/// model, before a run on the model has been timed: about a second for+/// base and ten for medium on eight cores of a recent CPU.+const WINDOW_SECONDS_PER_MB: f32 = 1.0 / 160.0;+/// The captions sheet's state.#[derive(Default)]pub struct CaptionsPane {@@ -91,11 +102,14 @@ pub struct CaptionsPane {/// 0 small, 1 medium, 2 large.pub size: usize,pub running: bool,- pub progress: f32,+ /// How far the running transcription looks.+ pub pace: Pace,/// Why the last run failed, when it did.pub message: String,/// The clip under the running transcription.subject: Option<Subject>,+ /// How long each model took this session, for the next run's bar.+ timings: Timings,}impl CaptionsPane {@@ -149,12 +163,14 @@ impl CaptionsPane {self.running = false;self.open = false;}- CaptionsMsg::Progress(percent) => {- self.progress = (percent as f32 / 100.0).clamp(0.0, 1.0);- }+ CaptionsMsg::Progress(stage) => self.pace.report(stage),CaptionsMsg::Finished(result) => {self.running = false;let subject = self.subject.take();+ if let (Ok(_), Some(subject)) = (&result, &subject) {+ self.timings+ .keep(&subject.model, self.pace.learned(subject.windows));+ }match result {Ok(segments) => {let Some(subject) = subject else {@@ -216,6 +232,7 @@ impl CaptionsPane {model,placement: 0,size: 1,+ timings: std::mem::take(&mut self.timings),..CaptionsPane::default()};}@@ -263,9 +280,9 @@ impl CaptionsPane {self.message = t("captions.clipHasNoFile");return;};- let Some(model) = installed(&studio.settings.transcribers)+ let Some((model, megabytes)) = installed(&studio.settings.transcribers).get(self.model)- .map(|model| model.id.clone())+ .map(|model| (model.id.clone(), model.megabytes))else {self.message = t("captions.downloadTranscriberModelFirst");return;@@ -275,24 +292,45 @@ impl CaptionsPane {audio_stream: clip.audio_stream,source_start: clip.source_start,window: clip.duration * clip.speed,- model_id: model,+ model_id: model.clone(),};let dirs = studio.host.dirs.clone();let transcriber = Arc::clone(&studio.host.transcriber);+ // The run as the bar lays it out: the sound read in at a few+ // hundred times its length, the model loaded unless it still is,+ // and whisper a window at a time - at the pace the last run on+ // this model measured, or the estimate by its size.+ let windows = (request.window / 30.0).ceil().max(1.0) as f32;+ let learned = self.timings.get(&model);+ let loaded = studio.host.transcriber.loaded_model().as_deref() == Some(model.as_str());+ let load = if loaded {+ 0.0+ } else {+ learned.load.unwrap_or(0.5 + megabytes / 400.0)+ };+ let per_window = learned+ .per_unit+ .unwrap_or(0.3 + megabytes * WINDOW_SECONDS_PER_MB);+ self.pace = Pace::new(vec![+ (Stage::Reading, 0.2 + request.window as f32 / 400.0),+ (Stage::Loading, load),+ (Stage::Working, windows * per_window),+ ]);self.subject = Some(Subject {start: clip.start,speed: clip.speed,look: self.look(),+ model,+ windows,});self.running = true;- self.progress = 0.0;self.message.clear();let epoch = crate::host::project_epoch();spawn_in_project(move || {- transcriber.transcribe(&dirs, &request, move |percent| {+ transcriber.transcribe(&dirs, &request, move |stage| {on_ui_in_project(epoch, move |studio, _, _| {- studio.handle(Msg::Captions(CaptionsMsg::Progress(percent)));+ studio.handle(Msg::Captions(CaptionsMsg::Progress(stage)));});})},@@ -326,7 +364,16 @@ impl CaptionsPane {placement: self.placement as i32,size: self.size as i32,running: self.running,- progress: self.progress,+ progress: self.pace.floor,+ ceiling: self.pace.ceiling,+ step: self.pace.step,+ left: self.pace.left,+ stage: match self.pace.stage() {+ Some(Stage::Loading) => t("captions.loadingTheModel"),+ Some(Stage::Working) => t("captions.transcribing"),+ _ => t("captions.readingTheSound"),+ }+ .into(),ready: !installed(&studio.settings.transcribers).is_empty(),message: self.message.as_str().into(),}diff --git a/src/crates/concat/src/panes/mod.rs b/src/crates/concat/src/panes/mod.rsindex caf71dd2..d9b9ded1 100644--- a/src/crates/concat/src/panes/mod.rs+++ b/src/crates/concat/src/panes/mod.rs@@ -18,6 +18,7 @@ pub mod captions;pub mod export;pub mod media_bin;pub mod monitor;+pub mod pace;pub mod project;pub mod relink;pub mod settings;diff --git a/src/crates/concat/src/panes/pace.rs b/src/crates/concat/src/panes/pace.rsnew file mode 100644index 00000000..920e3494--- /dev/null+++ b/src/crates/concat/src/panes/pace.rs@@ -0,0 +1,310 @@+// SPDX-License-Identifier: AGPL-3.0-or-later+// SPDX-FileCopyrightText: 2026 Jareer and Concat contributors++//! How far along a transcription or a read looks, from what it reports.+//!+//! The jobs report rarely: whisper once per thirty seconds of sound, Kokoro+//! and Pocket once per sentence, and nothing at all while the sound is read+//! in or the model loads. A bar fed only those numbers sits still for most+//! of a run and then jumps. [`Pace`] lays the run out as its stages, each+//! given room on the bar by how long it is expected to take, and for each+//! report says three things: where the bar surely is (`floor`), where the+//! step under way will leave it (`ceiling`), and how long that step should+//! take (`step`). The bar moves from floor toward ceiling in that time and+//! never reaches the ceiling before the job says so; see `Progress` in+//! primitives/modal.slint.+//!+//! The expectations start as estimates from the model's size and the+//! input's length, and are replaced by what the run measures once the work+//! has reported once: from then on the step and the time left are timed,+//! not guessed. [`Learned`] carries a finished run's timings to the next+//! run on the same model.++use std::collections::HashMap;+use std::time::Instant;++use concat_speech::JobStage;++/// A stage of a run, as the plan names it.+#[derive(Clone, Copy, Debug, PartialEq, Eq)]+pub enum Stage {+ Reading,+ Loading,+ Working,+}++/// One run's progress, as the bar draws it.+#[derive(Clone, Debug)]+pub struct Pace {+ /// The stages the run will report, in order, each with the seconds it+ /// is expected to take.+ plan: Vec<(Stage, f32)>,+ /// The stage under way, by its row in `plan`.+ at: Option<usize>,+ /// When the stage under way began.+ since: Instant,+ /// When the work began, which is what its rate is timed from.+ working: Option<Instant>,+ /// How long the model took to load, when this run loaded it.+ loaded_in: Option<f32>,+ /// Where the bar surely is, `0..=1`.+ pub floor: f32,+ /// Where the step under way will leave it, `floor..=1`.+ pub ceiling: f32,+ /// Seconds the step under way is expected to take.+ pub step: f32,+ /// Seconds of the run still to go, once the work has been timed;+ /// negative before.+ pub left: f32,+}++impl Default for Pace {+ fn default() -> Self {+ Self::new(Vec::new())+ }+}++impl Pace {+ /// A run that will go through `plan`'s stages, in order. A stage the+ /// run turns out to skip (a model already loaded) is passed over when+ /// the next one is reported.+ pub fn new(plan: Vec<(Stage, f32)>) -> Self {+ let mut pace = Self {+ plan,+ at: None,+ since: Instant::now(),+ working: None,+ loaded_in: None,+ floor: 0.0,+ ceiling: 0.0,+ step: 0.0,+ left: -1.0,+ };+ // Before the first report the run heads for the end of its first+ // stage that takes any time.+ if let Some(index) = pace.first() {+ pace.ceiling = pace.span(index).1;+ pace.step = pace.plan[index].1;+ }+ pace+ }++ /// The stage the run is in: the one it last reported, or before any+ /// report the first that takes any time.+ pub fn stage(&self) -> Option<Stage> {+ self.at+ .or_else(|| self.first())+ .map(|index| self.plan[index].0)+ }++ /// The first stage in the plan expected to take any time.+ fn first(&self) -> Option<usize> {+ self.plan.iter().position(|&(_, seconds)| seconds > 0.0)+ }++ /// Where on the bar stage `index` runs, from and to.+ fn span(&self, index: usize) -> (f32, f32) {+ let total: f32 = self.plan.iter().map(|(_, seconds)| seconds).sum();+ if total <= 0.0 {+ return (0.0, 1.0);+ }+ let before: f32 = self.plan[..index].iter().map(|(_, seconds)| seconds).sum();+ let start = before / total;+ (start, start + self.plan[index].1 / total)+ }++ /// Takes in one report from the run.+ pub fn report(&mut self, stage: JobStage) {+ let named = match stage {+ JobStage::Reading => Stage::Reading,+ JobStage::Loading => Stage::Loading,+ JobStage::Working { .. } => Stage::Working,+ };+ let Some(index) = self.plan.iter().position(|(planned, _)| *planned == named) else {+ return;+ };+ if self.at != Some(index) {+ if self.at.is_some_and(|at| self.plan[at].0 == Stage::Loading) {+ self.loaded_in = Some(self.since.elapsed().as_secs_f32());+ }+ self.at = Some(index);+ self.since = Instant::now();+ }+ let (start, end) = self.span(index);+ let (done, next) = match stage {+ JobStage::Working { done, next } => {+ let done = done.clamp(0.0, 1.0);+ (done, next.clamp(done, 1.0))+ }+ _ => (0.0, 1.0),+ };+ self.floor = self.floor.max(start + done * (end - start));+ self.ceiling = (start + next * (end - start)).max(self.floor);+ let planned = self.plan[index].1;+ self.step = planned * (next - done);+ self.left = -1.0;+ if named == Stage::Working {+ let working = *self.working.get_or_insert_with(Instant::now);+ // Timed once a little of the work is done: before that the+ // rate is mostly the time to the first report.+ if done >= 0.02 {+ let per = working.elapsed().as_secs_f32() / done;+ self.step = per * (next - done);+ self.left = per * (1.0 - done);+ }+ }+ }++ /// What this run measured, for the next one on the same model: the+ /// load, when it loaded, and the work's seconds per `units` of input.+ pub fn learned(&self, units: f32) -> Learned {+ Learned {+ load: self.loaded_in,+ per_unit: self+ .working+ .filter(|_| units > 0.0)+ .map(|working| working.elapsed().as_secs_f32() / units),+ }+ }+}++/// A finished run's timings, kept for the next run on the same model.+#[derive(Clone, Copy, Debug, Default, PartialEq)]+pub struct Learned {+ /// Seconds the model took to load.+ pub load: Option<f32>,+ /// Seconds of work per unit of input: per thirty-second window for a+ /// transcription, per character for a read.+ pub per_unit: Option<f32>,+}++/// The timings learned this session, by model id.+#[derive(Clone, Debug, Default)]+pub struct Timings(HashMap<String, Learned>);++impl Timings {+ pub fn get(&self, model: &str) -> Learned {+ self.0.get(model).copied().unwrap_or_default()+ }++ /// Keeps what a finished run measured, over what an earlier one did; a+ /// run that did not load the model keeps the earlier load.+ pub fn keep(&mut self, model: &str, learned: Learned) {+ let kept = self.0.entry(model.to_owned()).or_default();+ kept.load = learned.load.or(kept.load);+ kept.per_unit = learned.per_unit.or(kept.per_unit);+ }+}++#[cfg(test)]+mod tests {+ use super::*;++ fn close(a: f32, b: f32) -> bool {+ (a - b).abs() < 1e-4+ }++ /// Each stage has room on the bar by its expected time, and a stage's+ /// report heads the bar for the end of it.+ #[test]+ fn stages_take_room_by_their_expected_time() {+ let mut pace = Pace::new(vec![+ (Stage::Reading, 1.0),+ (Stage::Loading, 3.0),+ (Stage::Working, 6.0),+ ]);+ assert!(close(pace.ceiling, 0.1));+ pace.report(JobStage::Reading);+ assert!(close(pace.floor, 0.0) && close(pace.ceiling, 0.1));+ assert!(close(pace.step, 1.0));+ pace.report(JobStage::Loading);+ assert!(close(pace.floor, 0.1) && close(pace.ceiling, 0.4));+ assert!(close(pace.step, 3.0));+ pace.report(JobStage::Working {+ done: 0.0,+ next: 0.5,+ });+ assert!(close(pace.floor, 0.4) && close(pace.ceiling, 0.7));+ assert!(close(pace.step, 3.0));+ assert!(pace.left < 0.0, "nothing timed yet");+ pace.report(JobStage::Working {+ done: 0.5,+ next: 1.0,+ });+ assert!(close(pace.floor, 0.7) && close(pace.ceiling, 1.0));+ assert!(pace.left >= 0.0, "timed once the work has reported");+ }++ /// A stage the run skips - the model was still loaded - is passed+ /// over, and the bar never goes back.+ #[test]+ fn a_skipped_stage_is_passed_over_and_the_bar_never_goes_back() {+ let mut pace = Pace::new(vec![+ (Stage::Reading, 1.0),+ (Stage::Loading, 1.0),+ (Stage::Working, 2.0),+ ]);+ pace.report(JobStage::Reading);+ pace.report(JobStage::Working {+ done: 0.0,+ next: 1.0,+ });+ assert!(close(pace.floor, 0.5) && close(pace.ceiling, 1.0));+ pace.report(JobStage::Reading);+ assert!(close(pace.floor, 0.5), "a late report cannot move it back");+ assert!(pace.ceiling >= pace.floor);+ }++ /// A model still loaded takes no time: before any report the run is+ /// in, and heads for the end of, the first stage that does.+ #[test]+ fn a_stage_of_no_time_is_not_the_one_shown_first() {+ let pace = Pace::new(vec![(Stage::Loading, 0.0), (Stage::Working, 4.0)]);+ assert_eq!(pace.stage(), Some(Stage::Working));+ assert!(close(pace.ceiling, 1.0) && close(pace.step, 4.0));+ }++ /// Reports outside the plan, or with numbers out of range, change+ /// nothing they should not.+ #[test]+ fn reports_out_of_range_are_held_in() {+ let mut pace = Pace::new(vec![(Stage::Working, 1.0)]);+ pace.report(JobStage::Loading);+ assert!(close(pace.floor, 0.0));+ pace.report(JobStage::Working {+ done: 1.5,+ next: 0.2,+ });+ assert!(close(pace.floor, 1.0) && close(pace.ceiling, 1.0));+ let empty = Pace::default();+ assert!(close(empty.floor, 0.0) && close(empty.ceiling, 0.0));+ }++ /// A run that did not load keeps the earlier run's load.+ #[test]+ fn timings_keep_the_last_measure_of_each() {+ let mut timings = Timings::default();+ timings.keep(+ "base",+ Learned {+ load: Some(2.0),+ per_unit: Some(1.0),+ },+ );+ timings.keep(+ "base",+ Learned {+ load: None,+ per_unit: Some(0.5),+ },+ );+ assert_eq!(+ timings.get("base"),+ Learned {+ load: Some(2.0),+ per_unit: Some(0.5),+ }+ );+ assert_eq!(timings.get("other"), Learned::default());+ }+}diff --git a/src/crates/concat/src/panes/speech.rs b/src/crates/concat/src/panes/speech.rsindex 9cbcaf58..bf5a2ff5 100644--- a/src/crates/concat/src/panes/speech.rs+++ b/src/crates/concat/src/panes/speech.rs@@ -25,6 +25,7 @@ use std::sync::Arc;use concat_host::media::{self, MediaSummary};use concat_project::Command;use concat_project::model::{ClipKind, MediaItem, MediaOrigin};+use concat_speech::JobStage;use concat_speech::tts::{CHATTERBOX_CLONE, Family, POCKET_CLONE, Reference, VoiceInfo, family_of, is_clone,};@@ -35,6 +36,7 @@ use crate::host::{on_ui_in_project, spawn_in_project};use crate::i18n::{t, tf};use crate::panes::Msg;use crate::panes::captions::CHARS_PER_SECOND;+use crate::panes::pace::{Pace, Stage, Timings};use crate::panes::settings::installed;use crate::studio::Studio;use crate::ui::SpeechSheetData;@@ -54,6 +56,16 @@ const STEPS: [i32; 3] = [3, 5, 8];/// The breath between sentences the sheet opens on: sherpa's own.const DEFAULT_PAUSES: f32 = 0.2;+/// Seconds a model takes to read one second of speech, before a read with+/// it has been timed: about what each took on a recent CPU.+fn reading_pace(family: Family) -> f32 {+ match family {+ Family::Kokoro => 0.35,+ Family::Pocket => 0.3,+ Family::Chatterbox => 1.6,+ }+}+/// Everything that can happen to the speech sheet.#[derive(Clone, Debug)]pub enum SpeechMsg {@@ -79,7 +91,7 @@ pub enum SpeechMsg {Begin,Cancel,/// The synthesiser's worker reporting where it is, `0..=1`.- Progress(f32),+ Progress(JobStage),/// The synthesiser's worker is done: the file it wrote, probed, or/// why not.Finished(Box<Result<MediaSummary, String>>),@@ -116,7 +128,13 @@ pub struct SpeechPane {/// a recording is not always where the speaking is.pub reference_start: f64,pub running: bool,- pub progress: f32,+ /// How far the running read looks.+ pub pace: Pace,+ /// The model and the length of the running read: what its timing is+ /// kept by.+ reading: Option<(String, f32)>,+ /// How long each model took this session, for the next read's bar.+ timings: Timings,pub message: String,/// Where the running read will land on the timeline, in seconds.landing: f64,@@ -157,6 +175,7 @@ impl SpeechPane {sample: 0,reference_start: 0.0,speakers: std::mem::take(&mut self.speakers),+ timings: std::mem::take(&mut self.timings),..SpeechPane::default()};// The voice chosen last time, if the model reads with it;@@ -215,9 +234,12 @@ impl SpeechPane {self.running = false;self.open = false;}- SpeechMsg::Progress(fraction) => self.progress = fraction.clamp(0.0, 1.0),+ SpeechMsg::Progress(stage) => self.pace.report(stage),SpeechMsg::Finished(result) => {self.running = false;+ if let (Ok(_), Some((model, chars))) = (result.as_ref(), self.reading.take()) {+ self.timings.keep(&model, self.pace.learned(chars));+ }match *result {Ok(summary) => {// Marked as read aloud: the bin shelves it under@@ -258,9 +280,9 @@ impl SpeechPane {self.message = t("speech.nothingToReadYet");return;}- let Some(model) = installed(&studio.settings.voices)+ let Some((model, megabytes)) = installed(&studio.settings.voices).get(self.model)- .map(|model| model.id.clone())+ .map(|model| (model.id.clone(), model.megabytes))else {self.message = t("speech.downloadVoiceModelFirst");return;@@ -320,6 +342,28 @@ impl SpeechPane {.and_then(|id| studio.clip(id)).map(|clip| clip.start).unwrap_or(f64::from(studio.playhead));+ // The read as the bar lays it out: the model loaded unless it+ // still is, the recording the voice comes from read in (Kokoro+ // has none), and the reading at the pace the last read with this+ // model measured, or the model's usual pace.+ let chars = text.chars().count() as f32;+ let learned = self.timings.get(&model);+ let loaded = studio.host.speech.loaded_model().as_deref() == Some(model.as_str());+ let load = if loaded {+ 0.0+ } else {+ learned.load.unwrap_or(0.5 + megabytes / 150.0)+ };+ let per_char = learned+ .per_unit+ .unwrap_or(reading_pace(self.family) / CHARS_PER_SECOND / self.rate());+ let mut plan = vec![(Stage::Loading, load)];+ if self.family != Family::Kokoro {+ plan.push((Stage::Reading, 0.3));+ }+ plan.push((Stage::Working, chars * per_char));+ self.pace = Pace::new(plan);+ self.reading = Some((model.clone(), chars));let request = concat_speech::tts::SpeakRequest {model_id: model,voice,@@ -334,14 +378,13 @@ impl SpeechPane {let dirs = studio.host.dirs.clone();let speech = Arc::clone(&studio.host.speech);self.running = true;- self.progress = 0.0;self.message.clear();let epoch = crate::host::project_epoch();spawn_in_project(move || {- let spoken = speech.speak(&dirs, &request, move |fraction| {+ let spoken = speech.speak(&dirs, &request, move |stage| {on_ui_in_project(epoch, move |studio, _, _| {- studio.handle(Msg::Speech(SpeechMsg::Progress(fraction)));+ studio.handle(Msg::Speech(SpeechMsg::Progress(stage)));});})?;let summary = media::probe(&spoken.path)?;@@ -560,7 +603,16 @@ impl SpeechPane {reference_length: length as f32,reference_start: self.reference_offset(length) as f32,running: self.running,- progress: self.progress,+ progress: self.pace.floor,+ ceiling: self.pace.ceiling,+ step: self.pace.step,+ left: self.pace.left,+ stage: match self.pace.stage() {+ Some(Stage::Reading) => t("speech.readingTheSample"),+ Some(Stage::Working) => t("speech.generatingVoice"),+ _ => t("speech.loadingTheModel"),+ }+ .into(),ready: !installed(&studio.settings.voices).is_empty(),estimate: self.estimate(studio).into(),message: self.message.as_str().into(),diff --git a/src/crates/concat/src/studio.rs b/src/crates/concat/src/studio.rsindex 593d8478..00479419 100644--- a/src/crates/concat/src/studio.rs+++ b/src/crates/concat/src/studio.rs@@ -7247,9 +7247,9 @@ impl Studio {self.art_stamp = None;self.proxied.clear();self.captions.running = false;- self.captions.progress = 0.0;+ self.captions.pace = Default::default();self.speech.running = false;- self.speech.progress = 0.0;+ self.speech.pace = Default::default();self.source = None;// A take running as the project closes stops, keeping its file;// the next project's speakers are not left silent.diff --git a/src/crates/concat/ui/dialogs/captions.slint b/src/crates/concat/ui/dialogs/captions.slintindex a48dcde2..c23b6013 100644--- a/src/crates/concat/ui/dialogs/captions.slint+++ b/src/crates/concat/ui/dialogs/captions.slint@@ -40,8 +40,17 @@ export struct CaptionsSheetData {/// 0 Small, 1 Medium, 2 Largesize: int,running: bool,- /// 0..1+ /// 0..1: where the transcription surely is.progress: float,+ /// Where the step under way leaves the bar, 0..1.+ ceiling: float,+ /// Seconds that step should take.+ step: float,+ /// Seconds of the run still to go, once the work has been timed;+ /// negative before.+ left: float,+ /// What the run is doing, in words.+ stage: string,/// A transcriber model is installed.ready: bool,/// Why the last run failed, when it did.@@ -265,28 +274,48 @@ export component CaptionsDialog inherits Modal {}}- if root.data.running: HorizontalLayout {+ if root.data.running: VerticalLayout {spacing: 8px;- Text {- horizontal-stretch: 1;- text: root.data.progress < 0.02 ? I18n.t("captions.loadingTheModel") : I18n.t("captions.transcribing");- color: Theme.fg;- font-size: Theme.fs;- vertical-alignment: center;+ row := HorizontalLayout {+ spacing: 8px;+ // The time left, once the work has been timed: counted down+ // from the last report, and gone in the last second.+ property <int> left: Math.ceil(Math.max(0, root.data.left - bar.since / 1s));++ Text {+ horizontal-stretch: 1;+ text: root.data.stage;+ color: Theme.fg;+ font-size: Theme.fs;+ vertical-alignment: center;+ }++ if root.data.left >= 0 && row.left > 0: Text {+ text: I18n.t2("common.aboutLeft", "\{Math.floor(row.left / 60)}",+ (Math.mod(row.left, 60) < 10 ? "0" : "") + "\{Math.mod(row.left, 60)}");+ color: Theme.fg-dim;+ font-size: Theme.fs;+ vertical-alignment: center;+ }++ Text {+ text: "\{Math.floor(bar.shown * 100)}%";+ color: Theme.fg-muted;+ font-family: Theme.font-technical;+ font-size: Theme.fs;+ vertical-alignment: center;+ }}- Text {- text: "\{Math.round(root.data.progress * 100)}%";- color: Theme.fg-muted;- font-family: Theme.font-technical;- font-size: Theme.fs;- vertical-alignment: center;+ bar := Progress {+ value: root.data.progress;+ ceiling: root.data.ceiling;+ step: root.data.step * 1s;+ live: true;}}- if root.data.running: Progress { value: root.data.progress; }-if root.data.running: HorizontalLayout {alignment: start;Button {diff --git a/src/crates/concat/ui/dialogs/export.slint b/src/crates/concat/ui/dialogs/export.slintindex 6be2eb27..0d2fe92a 100644--- a/src/crates/concat/ui/dialogs/export.slint+++ b/src/crates/concat/ui/dialogs/export.slint@@ -610,7 +610,7 @@ component ExportFooter inherits VerticalLayout {}}- if root.running: Progress { value: root.data.progress; }+ if root.running: Progress { value: root.data.progress; live: true; }if root.running: HorizontalLayout {alignment: start;diff --git a/src/crates/concat/ui/dialogs/speech.slint b/src/crates/concat/ui/dialogs/speech.slintindex ae2c6a60..53d8d37e 100644--- a/src/crates/concat/ui/dialogs/speech.slint+++ b/src/crates/concat/ui/dialogs/speech.slint@@ -56,8 +56,17 @@ export struct SpeechSheetData {/// Seconds into that sample the speaking starts.reference-start: float,running: bool,- /// 0..1, as sentences complete.+ /// 0..1: where the read surely is.progress: float,+ /// Where the step under way leaves the bar, 0..1.+ ceiling: float,+ /// Seconds that step should take.+ step: float,+ /// Seconds of the run still to go, once the work has been timed;+ /// negative before.+ left: float,+ /// What the run is doing, in words.+ stage: string,/// A voice model is installed.ready: bool,/// "About 0:12 in Heart", or what stops it being read.@@ -589,38 +598,58 @@ export component SpeechDialog inherits Modal {}}- if root.running: HorizontalLayout {+ if root.running: VerticalLayout {spacing: 8px;- Text {- horizontal-stretch: 1;- text: I18n.t("speech.generatingVoice");- color: Theme.fg;- font-size: Theme.fs;- vertical-alignment: center;- }+ row := HorizontalLayout {+ spacing: 8px;+ // The time left, once the work has been timed: counted down+ // from the last report, and gone in the last second.+ property <int> left: Math.ceil(Math.max(0, root.data.left - bar.since / 1s));- Text {- text: "\{Math.round(root.data.progress * 100)}%";- color: Theme.fg-muted;- font-family: Theme.font-technical;- font-size: Theme.fs;- vertical-alignment: center;+ Text {+ horizontal-stretch: 1;+ text: root.data.stage;+ color: Theme.fg;+ font-size: Theme.fs;+ vertical-alignment: center;+ }++ if root.data.left >= 0 && row.left > 0: Text {+ text: I18n.t2("common.aboutLeft", "\{Math.floor(row.left / 60)}",+ (Math.mod(row.left, 60) < 10 ? "0" : "") + "\{Math.mod(row.left, 60)}");+ color: Theme.fg-dim;+ font-size: Theme.fs;+ vertical-alignment: center;+ }++ Text {+ text: "\{Math.floor(bar.shown * 100)}%";+ color: Theme.fg-muted;+ font-family: Theme.font-technical;+ font-size: Theme.fs;+ vertical-alignment: center;+ }++ Text {+ text: "\{Math.floor(root.elapsed / 60)}:"+ + (Math.mod(root.elapsed, 60) < 10 ? "0" : "")+ + "\{Math.mod(root.elapsed, 60)}";+ color: Theme.fg-dim;+ font-family: Theme.font-technical;+ font-size: Theme.fs;+ vertical-alignment: center;+ }}- Text {- text: "\{Math.floor(root.elapsed / 60)}:"- + (Math.mod(root.elapsed, 60) < 10 ? "0" : "")- + "\{Math.mod(root.elapsed, 60)}";- color: Theme.fg-dim;- font-family: Theme.font-technical;- font-size: Theme.fs;- vertical-alignment: center;+ bar := Progress {+ value: root.data.progress;+ ceiling: root.data.ceiling;+ step: root.data.step * 1s;+ live: true;}}- if root.running: Progress { value: root.data.progress; }-if root.running: HorizontalLayout {alignment: start;Button {diff --git a/src/crates/concat/ui/primitives/modal.slint b/src/crates/concat/ui/primitives/modal.slintindex cad307e8..1d303b19 100644--- a/src/crates/concat/ui/primitives/modal.slint+++ b/src/crates/concat/ui/primitives/modal.slint@@ -306,14 +306,52 @@ export component CopyChip inherits Rectangle {// A determinate bar. Nothing indeterminate: every job in this app can say how// far along it is, and a barber's pole for one that can is a lie.+//+// What a job says can be coarse - a transcription reports once per thirty+// seconds of sound, a read once per sentence - so a job that knows where+// the step under way ends gives it as `ceiling`, and the time the step+// should take as `step`. The fill moves from `value` toward `ceiling` over+// that time, steadily for nine tenths of the way and then ever slower, so+// it never reaches the ceiling before the job reports it has. A report+// ahead of the fill slides it forward rather than jumping. While `live`, a+// sheen runs along the fill to say the job is still at work, which a fill+// waiting on a report would not; the sheen never moves the fill.export component Progress inherits Rectangle {in property <float> value;+ /// Where the step under way leaves the bar; `value` when the job does+ /// not say.+ in property <float> ceiling: root.value;+ /// How long that step should take.+ in property <duration> step;/// Finished: the bar turns green rather than staying accent, so a glance/// tells you it is over without reading the row above it.in property <bool> done;+ /// The job is running: the sheen runs along the fill.+ in property <bool> live;+ /// Where the fill is, 0..1: what a percentage beside the bar reads.+ out property <float> shown: Math.clamp(+ root.ceiling > root.value && root.step > 0ms+ ? root.value + (root.ceiling - root.value) * root.creep((animation-tick() - root.mark) / root.step)+ : root.value,+ 0, 1);+ /// The time since the last report, for a countdown beside the bar.+ out property <duration> since: animation-tick() - root.mark;++ /// When the job last reported.+ property <duration> mark;+ init => { root.mark = animation-tick(); }+ changed value => { root.mark = animation-tick(); }+ changed ceiling => { root.mark = animation-tick(); }++ /// How far toward the ceiling the fill is `u` steps in: in a straight+ /// line to nine tenths at one step, then half the rest by two, and so+ /// on, never the whole.+ pure function creep(u: float) -> float {+ return u <= 1 ? 0.9 * Math.max(u, 0) : 0.9 + 0.1 * (u - 1) / u;+ }- height: 4px;- border-radius: 2px;+ height: 8px;+ border-radius: self.height / 2;background: Theme.well;border-width: 1px;border-color: Theme.line;@@ -322,10 +360,21 @@ export component Progress inherits Rectangle {Rectangle {x: 0;y: 0;- width: parent.width * Math.clamp(root.value, 0, 1);+ // Never thinner than it is tall once it has begun, so its end is+ // round from the first step.+ width: root.shown > 0 ? Math.max(parent.height, parent.width * root.shown) : 0px;+ animate width { duration: 280ms; easing: ease-out; }height: parent.height;- border-radius: 2px;+ border-radius: self.height / 2;background: root.done ? Theme.green : Theme.accent;+ clip: true;++ if root.live && !root.done: Rectangle {+ property <float> phase: Math.mod(animation-tick() / 1ms, 1800) / 1800;+ width: Math.max(48px, root.width / 4);+ x: (parent.width + self.width) * self.phase - self.width;+ background: @linear-gradient(90deg, #ffffff00 0%, #ffffff59 50%, #ffffff00 100%);+ }}}