diff --git a/config/defaults.json b/config/defaults.json index 8a411ba..adbf006 100644 --- a/config/defaults.json +++ b/config/defaults.json @@ -15,7 +15,7 @@ "dictation": false, "profanity_filter": false, "diarize": false, - "diarize_version": "", + "diarize_model": "", "detect_entities": false, "multichannel": false, "utterances": false, diff --git a/static/app.js b/static/app.js index 6044708..6246112 100644 --- a/static/app.js +++ b/static/app.js @@ -305,7 +305,7 @@ function appData() { dictation: false, profanity_filter: false, diarize: false, - diarize_version: '', + diarize_model: '', detect_entities: false, multichannel: false, utterances: false, @@ -1089,7 +1089,7 @@ function appData() { dictation: false, profanity_filter: false, diarize: false, - diarize_version: '', + diarize_model: '', detect_entities: false, multichannel: false, utterances: false, diff --git a/stt/options.py b/stt/options.py index 005a1c7..491edc4 100644 --- a/stt/options.py +++ b/stt/options.py @@ -173,6 +173,22 @@ def clean_params(params: dict, mode: Mode) -> dict: continue _put(result, wire, v) + # `diarize_model` is mutually exclusive with the deprecated `diarize` and + # `diarize_version`. Deepgram does not pick a winner, it rejects outright: + # + # 400 diarize_model cannot be used together with diarize or + # diarize_version. (INVALID_QUERY_PARAMETER) + # + # `diarize_model` wins here because it is the current parameter and the only + # way to reach the v2 diarizer: the boolean `diarize` ALWAYS routes to v1, + # and `diarize_version` is legacy. The UI already makes the two controls + # exclusive; this covers the `extra` escape hatch and any saved config from + # before the field was renamed, so an old preset degrades to the modern + # parameter instead of a hard 400. + if "diarize_model" in result: + for legacy in ("diarize", "diarize_version"): + result.pop(legacy, None) + return result diff --git a/templates/index.html b/templates/index.html index 625f3cf..5cf6b91 100644 --- a/templates/index.html +++ b/templates/index.html @@ -389,6 +389,19 @@ letter-spacing: 0.06em; } + .field-hint { + font-size: 11px; + line-height: 1.45; + color: #8b93a7; + margin-top: 5px; + } + .field-hint code { + background: #1a2234; + padding: 1px 4px; + border-radius: 3px; + color: #a5b4fc; + } + .field-input { background: #1a1f2e; border: 1px solid #2d3748; @@ -1319,9 +1332,14 @@
+
- - + +
@@ -1340,17 +1358,34 @@
- - +
+ Sends diarize_model and omits diarize. + The deprecated diarize checkbox always selects v1. +
+