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): the transcribe switch sits under the script and says what it does
Jareer29ef1feee67f
diff --git a/src/crates/concat/locales/ar.json b/src/crates/concat/locales/ar.jsonindex 5960f9f1..d6e97027 100644--- a/src/crates/concat/locales/ar.json+++ b/src/crates/concat/locales/ar.json@@ -28,9 +28,9 @@"captions.placement": "الموضع","captions.readingTheSound": "جارٍ قراءة صوت المقطع","captions.subRipSubtitles": "ترجمات SubRip",+ "captions.transcribeClipVoice": "تفريغ صوت هذا المقطع","captions.transcribing": "جارٍ التفريغ النصي","captions.typeWordsPutScreen": "اكتب الكلمات التي ستظهر على الشاشة…",- "captions.useVoiceFromTimeline": "استخدام الصوت من المخطط الزمني","clipInspector.add": "إضافة","clipInspector.analysis": "التحليل","clipInspector.applyToAll": "تطبيق على الكل",diff --git a/src/crates/concat/locales/bn.json b/src/crates/concat/locales/bn.jsonindex 048b1fdb..21326d9b 100644--- a/src/crates/concat/locales/bn.json+++ b/src/crates/concat/locales/bn.json@@ -28,9 +28,9 @@"captions.placement": "অবস্থান","captions.readingTheSound": "ক্লিপের শব্দ পড়া হচ্ছে","captions.subRipSubtitles": "SubRip সাবটাইটেল",+ "captions.transcribeClipVoice": "এই ক্লিপের কণ্ঠ লিখে নিন","captions.transcribing": "ট্রান্সক্রাইব করা হচ্ছে","captions.typeWordsPutScreen": "স্ক্রিনে দেখানোর শব্দগুলো লিখুন…",- "captions.useVoiceFromTimeline": "টাইমলাইনের কণ্ঠ ব্যবহার করুন","clipInspector.add": "যোগ করুন","clipInspector.analysis": "বিশ্লেষণ","clipInspector.applyToAll": "সবগুলোতে প্রয়োগ করুন",diff --git a/src/crates/concat/locales/de.json b/src/crates/concat/locales/de.jsonindex 98351e3e..e0bc9c2a 100644--- a/src/crates/concat/locales/de.json+++ b/src/crates/concat/locales/de.json@@ -28,9 +28,9 @@"captions.placement": "Platzierung","captions.readingTheSound": "Ton des Clips wird gelesen","captions.subRipSubtitles": "SubRip-Untertitel",+ "captions.transcribeClipVoice": "Stimme dieses Clips transkribieren","captions.transcribing": "Wird transkribiert","captions.typeWordsPutScreen": "Type the words to put on screen…",- "captions.useVoiceFromTimeline": "Stimme aus der Zeitleiste verwenden","clipInspector.add": "Addieren","clipInspector.analysis": "Analyse","clipInspector.applyToAll": "Auf alle anwenden",diff --git a/src/crates/concat/locales/en.json b/src/crates/concat/locales/en.jsonindex 62587f11..ec3fb84c 100644--- a/src/crates/concat/locales/en.json+++ b/src/crates/concat/locales/en.json@@ -28,9 +28,9 @@"captions.placement": "Placement","captions.readingTheSound": "Reading the clip's sound","captions.subRipSubtitles": "SubRip subtitles",+ "captions.transcribeClipVoice": "Transcribe this clip's voice","captions.transcribing": "Transcribing","captions.typeWordsPutScreen": "Type the words to put on screen…",- "captions.useVoiceFromTimeline": "Use voice from timeline","clipInspector.add": "Add","clipInspector.analysis": "Analysis","clipInspector.applyToAll": "Apply to all",diff --git a/src/crates/concat/locales/es.json b/src/crates/concat/locales/es.jsonindex bc48b6fb..bb2aaabc 100644--- a/src/crates/concat/locales/es.json+++ b/src/crates/concat/locales/es.json@@ -28,9 +28,9 @@"captions.placement": "Posición","captions.readingTheSound": "Leyendo el sonido del clip","captions.subRipSubtitles": "Subtítulos SubRip",+ "captions.transcribeClipVoice": "Transcribir la voz de este clip","captions.transcribing": "Transcribiendo","captions.typeWordsPutScreen": "Type the words to put on screen…",- "captions.useVoiceFromTimeline": "Usar la voz de la línea de tiempo","clipInspector.add": "Añadir","clipInspector.analysis": "Análisis","clipInspector.applyToAll": "Aplicar a todo",diff --git a/src/crates/concat/locales/fa.json b/src/crates/concat/locales/fa.jsonindex 6242bde3..0b0f23ac 100644--- a/src/crates/concat/locales/fa.json+++ b/src/crates/concat/locales/fa.json@@ -28,9 +28,9 @@"captions.placement": "جایگذاری","captions.readingTheSound": "در حال خواندن صدای کلیپ","captions.subRipSubtitles": "زیرنویسهای SubRip",+ "captions.transcribeClipVoice": "پیادهسازی متن صدای این کلیپ","captions.transcribing": "در حال رونویسی","captions.typeWordsPutScreen": "متنی را که باید روی صفحه نمایش داده شود وارد کنید…",- "captions.useVoiceFromTimeline": "استفاده از صدای خط زمان","clipInspector.add": "افزودن","clipInspector.analysis": "تحلیل","clipInspector.applyToAll": "اعمال روی همه",diff --git a/src/crates/concat/locales/fr.json b/src/crates/concat/locales/fr.jsonindex c6f159b9..b81dbe75 100644--- a/src/crates/concat/locales/fr.json+++ b/src/crates/concat/locales/fr.json@@ -28,9 +28,9 @@"captions.placement": "Position","captions.readingTheSound": "Lecture du son du clip","captions.subRipSubtitles": "Sous-titres SubRip",+ "captions.transcribeClipVoice": "Transcrire la voix de ce clip","captions.transcribing": "Transcription en cours","captions.typeWordsPutScreen": "Type the words to put on screen…",- "captions.useVoiceFromTimeline": "Utiliser la voix de la timeline","clipInspector.add": "Addition","clipInspector.analysis": "Analyse","clipInspector.applyToAll": "Appliquer à tout",diff --git a/src/crates/concat/locales/he.json b/src/crates/concat/locales/he.jsonindex 4a13707a..b596f54e 100644--- a/src/crates/concat/locales/he.json+++ b/src/crates/concat/locales/he.json@@ -28,9 +28,9 @@"captions.placement": "מיקום","captions.readingTheSound": "קורא את הצליל של הקליפ","captions.subRipSubtitles": "כתוביות SubRip",+ "captions.transcribeClipVoice": "תמלול הקול של הקליפ הזה","captions.transcribing": "מתמלל","captions.typeWordsPutScreen": "יש להקליד את המילים שיופיעו על המסך…",- "captions.useVoiceFromTimeline": "שימוש בקול מציר הזמן","clipInspector.add": "הוספה","clipInspector.analysis": "ניתוח","clipInspector.applyToAll": "החל על הכול",diff --git a/src/crates/concat/locales/hi.json b/src/crates/concat/locales/hi.jsonindex 4c663e3e..68e15266 100644--- a/src/crates/concat/locales/hi.json+++ b/src/crates/concat/locales/hi.json@@ -28,9 +28,9 @@"captions.placement": "स्थान","captions.readingTheSound": "क्लिप की आवाज़ पढ़ी जा रही है","captions.subRipSubtitles": "SubRip सबटाइटल",+ "captions.transcribeClipVoice": "इस क्लिप की आवाज़ लिखें","captions.transcribing": "ट्रांसक्राइब हो रहा है","captions.typeWordsPutScreen": "स्क्रीन पर दिखाने के लिए शब्द लिखें…",- "captions.useVoiceFromTimeline": "टाइमलाइन की आवाज़ इस्तेमाल करें","clipInspector.add": "जोड़ें","clipInspector.analysis": "विश्लेषण","clipInspector.applyToAll": "सब पर लागू करें",diff --git a/src/crates/concat/locales/hr.json b/src/crates/concat/locales/hr.jsonindex 40c39c85..d9877bda 100644--- a/src/crates/concat/locales/hr.json+++ b/src/crates/concat/locales/hr.json@@ -28,9 +28,9 @@"captions.placement": "Smještaj","captions.readingTheSound": "Čitanje zvuka isječka","captions.subRipSubtitles": "SubRip titlovi",+ "captions.transcribeClipVoice": "Prepiši glas ovog isječka","captions.transcribing": "Transkripcija","captions.typeWordsPutScreen": "Upišite riječi za prikaz na zaslonu…",- "captions.useVoiceFromTimeline": "Koristi glas s vremenske crte","clipInspector.add": "Dodaj","clipInspector.analysis": "Analiza","clipInspector.applyToAll": "Primijeni na sve",diff --git a/src/crates/concat/locales/id.json b/src/crates/concat/locales/id.jsonindex dbe4358a..c60f17d9 100644--- a/src/crates/concat/locales/id.json+++ b/src/crates/concat/locales/id.json@@ -28,9 +28,9 @@"captions.placement": "Penempatan","captions.readingTheSound": "Membaca suara klip","captions.subRipSubtitles": "Subtitel SubRip",+ "captions.transcribeClipVoice": "Transkripsikan suara klip ini","captions.transcribing": "Mentranskripsi","captions.typeWordsPutScreen": "Ketik kata-kata yang akan tampil di layar…",- "captions.useVoiceFromTimeline": "Gunakan suara dari linimasa","clipInspector.add": "Tambah","clipInspector.analysis": "Analisis","clipInspector.applyToAll": "Terapkan ke semua",diff --git a/src/crates/concat/locales/it.json b/src/crates/concat/locales/it.jsonindex 21edbbb0..2a5dd8bf 100644--- a/src/crates/concat/locales/it.json+++ b/src/crates/concat/locales/it.json@@ -28,9 +28,9 @@"captions.placement": "Posizione","captions.readingTheSound": "Lettura del suono della clip","captions.subRipSubtitles": "Sottotitoli SubRip",+ "captions.transcribeClipVoice": "Trascrivi la voce di questa clip","captions.transcribing": "Trascrizione in corso","captions.typeWordsPutScreen": "Type the words to put on screen…",- "captions.useVoiceFromTimeline": "Usa la voce dalla timeline","clipInspector.add": "Somma","clipInspector.analysis": "Analisi","clipInspector.applyToAll": "Applica a tutti",diff --git a/src/crates/concat/locales/ja.json b/src/crates/concat/locales/ja.jsonindex c2abec09..72742ee0 100644--- a/src/crates/concat/locales/ja.json+++ b/src/crates/concat/locales/ja.json@@ -28,9 +28,9 @@"captions.placement": "配置","captions.readingTheSound": "クリップの音声を読み込み中","captions.subRipSubtitles": "SubRip 字幕",+ "captions.transcribeClipVoice": "このクリップの声を文字起こし","captions.transcribing": "文字起こし中","captions.typeWordsPutScreen": "画面に表示する言葉を入力…",- "captions.useVoiceFromTimeline": "タイムラインの音声を使う","clipInspector.add": "加算","clipInspector.analysis": "解析","clipInspector.applyToAll": "すべてに適用",diff --git a/src/crates/concat/locales/ko.json b/src/crates/concat/locales/ko.jsonindex 6f047789..db914e98 100644--- a/src/crates/concat/locales/ko.json+++ b/src/crates/concat/locales/ko.json@@ -28,9 +28,9 @@"captions.placement": "배치","captions.readingTheSound": "클립 소리 읽는 중","captions.subRipSubtitles": "SubRip 자막",+ "captions.transcribeClipVoice": "이 클립의 음성 받아쓰기","captions.transcribing": "받아쓰는 중","captions.typeWordsPutScreen": "Type the words to put on screen…",- "captions.useVoiceFromTimeline": "타임라인의 음성 사용","clipInspector.add": "더하기","clipInspector.analysis": "분석","clipInspector.applyToAll": "모두 적용",diff --git a/src/crates/concat/locales/nl.json b/src/crates/concat/locales/nl.jsonindex e3c998e1..568b490a 100644--- a/src/crates/concat/locales/nl.json+++ b/src/crates/concat/locales/nl.json@@ -28,9 +28,9 @@"captions.placement": "Plaatsing","captions.readingTheSound": "Geluid van de clip lezen","captions.subRipSubtitles": "SubRip-ondertitels",+ "captions.transcribeClipVoice": "Stem van deze clip uitschrijven","captions.transcribing": "Transcriberen","captions.typeWordsPutScreen": "Typ de woorden die in beeld moeten komen…",- "captions.useVoiceFromTimeline": "Stem uit de tijdlijn gebruiken","clipInspector.add": "Toevoegen","clipInspector.analysis": "Analyse","clipInspector.applyToAll": "Op alles toepassen",diff --git a/src/crates/concat/locales/pl.json b/src/crates/concat/locales/pl.jsonindex 7c64ea71..cfb00436 100644--- a/src/crates/concat/locales/pl.json+++ b/src/crates/concat/locales/pl.json@@ -28,9 +28,9 @@"captions.placement": "Położenie","captions.readingTheSound": "Odczytywanie dźwięku klipu","captions.subRipSubtitles": "Napisy SubRip",+ "captions.transcribeClipVoice": "Transkrybuj głos z tego klipu","captions.transcribing": "Transkrypcja","captions.typeWordsPutScreen": "Wpisz słowa, które pojawią się na ekranie…",- "captions.useVoiceFromTimeline": "Użyj głosu z osi czasu","clipInspector.add": "Dodaj","clipInspector.analysis": "Analiza","clipInspector.applyToAll": "Zastosuj do wszystkich",diff --git a/src/crates/concat/locales/pt-BR.json b/src/crates/concat/locales/pt-BR.jsonindex 701e7890..3a3de780 100644--- a/src/crates/concat/locales/pt-BR.json+++ b/src/crates/concat/locales/pt-BR.json@@ -28,9 +28,9 @@"captions.placement": "Posição","captions.readingTheSound": "Lendo o som do clipe","captions.subRipSubtitles": "Legendas SubRip",+ "captions.transcribeClipVoice": "Transcrever a voz deste clipe","captions.transcribing": "Transcrevendo","captions.typeWordsPutScreen": "Digite as palavras que vão aparecer na tela…",- "captions.useVoiceFromTimeline": "Usar a voz da linha do tempo","clipInspector.add": "Adicionar","clipInspector.analysis": "Análise","clipInspector.applyToAll": "Aplicar a todos",diff --git a/src/crates/concat/locales/ru.json b/src/crates/concat/locales/ru.jsonindex e82b6193..ae2d3a7e 100644--- a/src/crates/concat/locales/ru.json+++ b/src/crates/concat/locales/ru.json@@ -28,9 +28,9 @@"captions.placement": "Расположение","captions.readingTheSound": "Чтение звука клипа","captions.subRipSubtitles": "Субтитры SubRip",+ "captions.transcribeClipVoice": "Расшифровать голос этого клипа","captions.transcribing": "Распознавание","captions.typeWordsPutScreen": "Введите слова, которые появятся на экране…",- "captions.useVoiceFromTimeline": "Использовать голос с таймлайна","clipInspector.add": "Сложение","clipInspector.analysis": "Анализ","clipInspector.applyToAll": "Применить ко всем",diff --git a/src/crates/concat/locales/th.json b/src/crates/concat/locales/th.jsonindex 1e5b5d9f..fc512703 100644--- a/src/crates/concat/locales/th.json+++ b/src/crates/concat/locales/th.json@@ -28,9 +28,9 @@"captions.placement": "ตำแหน่งที่วาง","captions.readingTheSound": "กำลังอ่านเสียงของคลิป","captions.subRipSubtitles": "คำบรรยาย SubRip",+ "captions.transcribeClipVoice": "ถอดเสียงพูดของคลิปนี้","captions.transcribing": "กำลังถอดเสียง","captions.typeWordsPutScreen": "พิมพ์ข้อความที่จะแสดงบนจอ…",- "captions.useVoiceFromTimeline": "ใช้เสียงพูดจากไทม์ไลน์","clipInspector.add": "เพิ่ม","clipInspector.analysis": "การวิเคราะห์","clipInspector.applyToAll": "ใช้กับทั้งหมด",diff --git a/src/crates/concat/locales/tr.json b/src/crates/concat/locales/tr.jsonindex cb191c46..d4e874b8 100644--- a/src/crates/concat/locales/tr.json+++ b/src/crates/concat/locales/tr.json@@ -28,9 +28,9 @@"captions.placement": "Yerleşim","captions.readingTheSound": "Klibin sesi okunuyor","captions.subRipSubtitles": "SubRip altyazıları",+ "captions.transcribeClipVoice": "Bu klibin sesini yazıya dök","captions.transcribing": "Yazıya dökülüyor","captions.typeWordsPutScreen": "Type the words to put on screen…",- "captions.useVoiceFromTimeline": "Zaman çizelgesindeki sesi kullan","clipInspector.add": "Topla","clipInspector.analysis": "Analiz","clipInspector.applyToAll": "Tümüne uygula",diff --git a/src/crates/concat/locales/uk.json b/src/crates/concat/locales/uk.jsonindex af8f9af6..eef8bc30 100644--- a/src/crates/concat/locales/uk.json+++ b/src/crates/concat/locales/uk.json@@ -28,9 +28,9 @@"captions.placement": "Розташування","captions.readingTheSound": "Читання звуку кліпу","captions.subRipSubtitles": "Субтитри SubRip",+ "captions.transcribeClipVoice": "Розшифрувати голос цього кліпу","captions.transcribing": "Розпізнавання","captions.typeWordsPutScreen": "Введіть слова, які з’являться на екрані…",- "captions.useVoiceFromTimeline": "Використати голос із часової шкали","clipInspector.add": "Додати","clipInspector.analysis": "Аналіз","clipInspector.applyToAll": "Застосувати до всіх",diff --git a/src/crates/concat/locales/ur.json b/src/crates/concat/locales/ur.jsonindex a972c47e..ea9609bd 100644--- a/src/crates/concat/locales/ur.json+++ b/src/crates/concat/locales/ur.json@@ -28,9 +28,9 @@"captions.placement": "جگہ","captions.readingTheSound": "کلپ کی آواز پڑھی جا رہی ہے","captions.subRipSubtitles": "SubRip سب ٹائٹلز",+ "captions.transcribeClipVoice": "اس کلپ کی آواز کی تحریر بنائیں","captions.transcribing": "ٹرانسکرائب ہو رہا ہے","captions.typeWordsPutScreen": "اسکرین پر دکھانے کے لیے الفاظ لکھیں…",- "captions.useVoiceFromTimeline": "ٹائم لائن کی آواز استعمال کریں","clipInspector.add": "شامل کریں","clipInspector.analysis": "تجزیہ","clipInspector.applyToAll": "سب پر لاگو کریں",diff --git a/src/crates/concat/locales/vi.json b/src/crates/concat/locales/vi.jsonindex 2d4e3d55..b594bd91 100644--- a/src/crates/concat/locales/vi.json+++ b/src/crates/concat/locales/vi.json@@ -28,9 +28,9 @@"captions.placement": "Vị trí","captions.readingTheSound": "Đang đọc âm thanh của clip","captions.subRipSubtitles": "Phụ đề SubRip",+ "captions.transcribeClipVoice": "Chép lời giọng nói của clip này","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","clipInspector.add": "Thêm","clipInspector.analysis": "Phân tích","clipInspector.applyToAll": "Áp dụng cho tất cả",diff --git a/src/crates/concat/locales/zh-Hans.json b/src/crates/concat/locales/zh-Hans.jsonindex 486a6150..33bba56c 100644--- a/src/crates/concat/locales/zh-Hans.json+++ b/src/crates/concat/locales/zh-Hans.json@@ -28,9 +28,9 @@"captions.placement": "位置","captions.readingTheSound": "正在读取片段的声音","captions.subRipSubtitles": "SubRip 字幕",+ "captions.transcribeClipVoice": "转写此片段的语音","captions.transcribing": "正在转录","captions.typeWordsPutScreen": "输入要显示在屏幕上的文字…",- "captions.useVoiceFromTimeline": "使用时间线中的语音","clipInspector.add": "添加","clipInspector.analysis": "分析","clipInspector.applyToAll": "应用到全部",diff --git a/src/crates/concat/locales/zh-TW.json b/src/crates/concat/locales/zh-TW.jsonindex e7b21708..3fbbe448 100644--- a/src/crates/concat/locales/zh-TW.json+++ b/src/crates/concat/locales/zh-TW.json@@ -28,9 +28,9 @@"captions.placement": "位置","captions.readingTheSound": "正在讀取片段的聲音","captions.subRipSubtitles": "SubRip 字幕",+ "captions.transcribeClipVoice": "轉寫此片段的語音","captions.transcribing": "正在轉錄","captions.typeWordsPutScreen": "輸入要顯示在螢幕上的文字…",- "captions.useVoiceFromTimeline": "使用時間軸中的語音","clipInspector.add": "加入","clipInspector.analysis": "分析","clipInspector.applyToAll": "套用至全部",diff --git a/src/crates/concat/src/panes/captions.rs b/src/crates/concat/src/panes/captions.rsindex ad09b7de..2ac4f126 100644--- a/src/crates/concat/src/panes/captions.rs+++ b/src/crates/concat/src/panes/captions.rs@@ -4,7 +4,7 @@//! The captions sheet: the tray's Captions tool, as a form and then as a//! progress report.//!-//! One switch says what it captions: "Use voice from timeline", on, takes+//! One switch says what it captions: "Use Sample Voice", on, takes//! the words from a clip with sound, chosen in the sheet from the clips on//! the timeline that have any; off, from a script typed in it. It opens on//! when a clip with sound is selected, or when a clip's menu opened it on@@ -51,7 +51,7 @@ pub enum CaptionsMsg {/// A clip's menu: the sheet on that clip's voice.OpenOnClip(String),Close,- /// The "Use voice from timeline" switch.+ /// The "Use Sample Voice" switch.VoiceToggled(bool),/// Row in the list of clips with sound.SourceChanged(i32),@@ -99,7 +99,7 @@ const WINDOW_SECONDS_PER_MB: f32 = 1.0 / 160.0;#[derive(Default)]pub struct CaptionsPane {pub open: bool,- /// "Use voice from timeline": the words come from [`Self::clip`]'s sound+ /// "Use Sample Voice": the words come from [`Self::clip`]'s sound/// when on, from [`Self::text`] when off.pub from_voice: bool,/// The clip whose voice is transcribed: one with sound, chosen from thediff --git a/src/crates/concat/ui/dialogs/captions.slint b/src/crates/concat/ui/dialogs/captions.slintindex 68c30598..0526fc74 100644--- a/src/crates/concat/ui/dialogs/captions.slint+++ b/src/crates/concat/ui/dialogs/captions.slint@@ -11,7 +11,7 @@ import { Switch } from "../inspector/controls.slint";// Captions: what the tray's Captions tool opens.//-// Two sheets in one, and a switch between them: "Use voice from timeline".+// Two sheets in one, and a switch between them: "Use Sample Voice".// On, the words are a clip's: one picked from the timeline's clips that// have sound, through the transcriber, cut to the words' own timing. Off,// they are a script typed here, one title per sentence at reading pace,@@ -32,7 +32,7 @@ import { Switch } from "../inspector/controls.slint";export struct CaptionsSheetData {open: bool,- /// "Use voice from timeline": the words come from a clip's sound.+ /// "Use Sample Voice": the words come from a clip's sound.from-voice: bool,/// The timeline's clips with sound, by file and start.sources: [string],@@ -103,8 +103,61 @@ export component CaptionsDialog inherits Modal {init => { root.draft = root.data.text; }VerticalLayout {- // The switch, above both halves. A row of its own rather than a- // DialogRow, whose label column is too narrow for the words.+ if !root.data.running && !root.from-voice: DialogSection {+ first: true;+ title: I18n.t("common.script");++ Rectangle {+ height: 104px;+ border-radius: Theme.r;+ background: Theme.well;+ border-width: 1px;+ border-color: script.has-focus ? Theme.accent : Theme.line;+ clip: true;++ script := TextInput {+ x: 10px;+ y: 8px;+ width: parent.width - 20px;+ height: parent.height - 16px;+ text <=> root.draft;+ color: Theme.fg;+ font-size: Theme.fs-lg;+ single-line: false;+ wrap: word-wrap;+ selection-background-color: Theme.accent;+ selection-foreground-color: Theme.on-accent;+ changed has-focus => { root.typing = self.has-focus; }+ edited => { root.text-edited(self.text); }+ // Home and End are unbound in Slint on macOS and would+ // walk up to the window's playhead shortcuts.+ key-pressed(event) => {+ if (event.text == Key.Home) {+ self.set-selection-offsets(0, 0);+ return accept;+ }+ if (event.text == Key.End) {+ self.set-selection-offsets(1000000000, 1000000000);+ return accept;+ }+ return reject;+ }+ }++ if root.draft == "" && !script.has-focus: Text {+ x: 10px;+ y: 8px;+ text: I18n.t("captions.typeWordsPutScreen");+ color: Theme.fg-dim;+ font-size: Theme.fs-lg;+ }+ }+ }++ // The switch, under the script it stands in for: off, the words+ // are typed above it; on, they come from a clip's voice, chosen+ // under it. A row of its own rather than a DialogRow, whose label+ // column is too narrow for the words.if !root.data.running: HorizontalLayout {padding-left: 14px;padding-right: 14px;@@ -113,7 +166,7 @@ export component CaptionsDialog inherits Modal {Text {horizontal-stretch: 1;- text: I18n.t("captions.useVoiceFromTimeline");+ text: I18n.t("captions.transcribeClipVoice");color: Theme.fg;font-size: Theme.fs;vertical-alignment: center;@@ -163,57 +216,6 @@ export component CaptionsDialog inherits Modal {}}- if !root.data.running && !root.from-voice: DialogSection {- first: true;- title: I18n.t("common.script");-- Rectangle {- height: 104px;- border-radius: Theme.r;- background: Theme.well;- border-width: 1px;- border-color: script.has-focus ? Theme.accent : Theme.line;- clip: true;-- script := TextInput {- x: 10px;- y: 8px;- width: parent.width - 20px;- height: parent.height - 16px;- text <=> root.draft;- color: Theme.fg;- font-size: Theme.fs-lg;- single-line: false;- wrap: word-wrap;- selection-background-color: Theme.accent;- selection-foreground-color: Theme.on-accent;- changed has-focus => { root.typing = self.has-focus; }- edited => { root.text-edited(self.text); }- // Home and End are unbound in Slint on macOS and would- // walk up to the window's playhead shortcuts.- key-pressed(event) => {- if (event.text == Key.Home) {- self.set-selection-offsets(0, 0);- return accept;- }- if (event.text == Key.End) {- self.set-selection-offsets(1000000000, 1000000000);- return accept;- }- return reject;- }- }-- if root.draft == "" && !script.has-focus: Text {- x: 10px;- y: 8px;- text: I18n.t("captions.typeWordsPutScreen");- color: Theme.fg-dim;- font-size: Theme.fs-lg;- }- }- }-if !root.data.running: DialogSection {title: I18n.t("captions.captions");