feat #14740: transcription model choice, vocabulary and short-word corrections

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
hauke
2026-11-10 13:10:50 +01:00
co-authored by Claude Sonnet 5
parent c57eb9511d
commit 8d757fd639
11 changed files with 472 additions and 12 deletions
+43
View File
@@ -43,6 +43,10 @@
]
let settings = $state<Settings | null>(null)
/** The vocabulary textarea's raw text, one term per line; converted
* to/from `settings.vocabulary` on load/save (the backend trims, drops
* blanks and deduplicates — see `Settings::edited`). */
let vocabularyText = $state('')
let devices = $state<Devices>({ inputs: [], outputs: [] })
let keySaved = $state<Record<Service, boolean>>({ deepscript: false })
let keyInput = $state<Record<Service, string>>({ deepscript: '' })
@@ -207,6 +211,7 @@
async function load() {
try {
settings = await getSettings()
vocabularyText = settings.vocabulary.join('\n')
for (const { id } of services) keySaved[id] = await hasApiKey(id)
devices = await listDevices()
} catch (err) {
@@ -268,7 +273,12 @@
if (!Number.isInteger(settings.retention_days) || settings.retention_days < 1) {
throw 'Aufbewahrung: bitte eine ganze Zahl ab 1 eingeben'
}
settings.vocabulary = vocabularyText.split('\n')
await saveSettings($state.snapshot(settings))
// Re-read: the backend trims/dedupes the vocabulary, so the textarea
// should show the cleaned-up list, not what was just typed.
settings = await getSettings()
vocabularyText = settings.vocabulary.join('\n')
}
async function runTest() {
@@ -474,6 +484,24 @@
</div>
</section>
<section class="card">
<h2>Transkription</h2>
<div class="grid">
<label for="deepscript-model">Modell</label>
<select id="deepscript-model" bind:value={settings.deepscript_model}>
<option value="premium">Premium</option>
<option value="premium_jade">Premium Jade</option>
</select>
<span></span>
<span class="muted">Gilt für neue Transkriptionen.</span>
</div>
<label for="vocabulary" class="vocabulary-label">Vokabular (ein Begriff pro Zeile)</label>
<textarea id="vocabulary" rows="6" bind:value={vocabularyText}></textarea>
<p class="muted">
Namen, Firmen- und Produktbegriffe, die oft falsch erkannt werden.
</p>
</section>
<section class="card">
<h2>Updates</h2>
<div class="grid">
@@ -575,6 +603,21 @@
justify-self: start;
}
.vocabulary-label {
display: block;
margin-top: 12px;
font-weight: 600;
}
textarea#vocabulary {
width: 100%;
max-width: 420px;
margin-top: 6px;
font-family: inherit;
font-size: 13px;
resize: vertical;
}
.hint {
margin: 12px 0;
padding: 8px 10px;