Skip to content

Speakr is a personal, self-hosted web application designed for transcribing audio recordings

Python

feat: admin card for the voice embedding check with re-baseline, document the check and heartbeat env vars in every example file

Murtaza Nasir46c9c407eb11
diff --git a/config/env.asr.example b/config/env.asr.example
index 82b5450e..8b3b3d24 100644
--- a/config/env.asr.example
+++ b/config/env.asr.example
@@ -413,6 +413,13 @@ MAX_CONCURRENT_UPLOADS=3
# Default: 24.
# RECORDING_SESSION_TTL_HOURS=24
+# How often (seconds) a sliced-upload ingest stamps its session as alive while
+# it reassembles and ingests the file. A session that misses three stamps is
+# treated as abandoned (its worker died, usually a container recreate) and a
+# retry of the same file takes it over instead of waiting out the TTL.
+# Default: 30 (minimum 5).
+# RECORDING_SESSION_INGEST_HEARTBEAT_SECONDS=30
+
# --- Webhooks (optional) ---
# Outbound webhooks notify external services when events occur. Configured
# per-user in the UI.
diff --git a/config/env.transcription.example b/config/env.transcription.example
index ef918d84..de445623 100644
--- a/config/env.transcription.example
+++ b/config/env.transcription.example
@@ -299,6 +299,15 @@ CHUNK_OVERLAP_SECONDS=3
# Optional:
# ASR_DIARIZE=true
# ASR_RETURN_SPEAKER_EMBEDDINGS=true
+
+# Voice embedding compatibility check
+# Voice profiles are only comparable with embeddings from the model that made
+# them. If the backend starts returning embeddings from a different model,
+# existing profiles silently stop matching. Speakr detects that at startup by
+# sending a short bundled clip and comparing the result with a stored
+# reference, and on demand from the admin page. Set to true to disable it.
+# Costs one short transcription per run.
+# DISABLE_VOICE_EMBEDDING_CHECK=false
#
# --- OpenAI Whisper (Legacy, no diarization) ---
# TRANSCRIPTION_API_KEY=sk-xxx
@@ -560,6 +569,13 @@ MAX_CONCURRENT_UPLOADS=3
# Default: 24.
# RECORDING_SESSION_TTL_HOURS=24
+# How often (seconds) a sliced-upload ingest stamps its session as alive while
+# it reassembles and ingests the file. A session that misses three stamps is
+# treated as abandoned (its worker died, usually a container recreate) and a
+# retry of the same file takes it over instead of waiting out the TTL.
+# Default: 30 (minimum 5).
+# RECORDING_SESSION_INGEST_HEARTBEAT_SECONDS=30
+
# =============================================================================
# WEBHOOKS (optional)
# =============================================================================
diff --git a/config/env.whisper.example b/config/env.whisper.example
index d63d1aa2..5b56c8cd 100644
--- a/config/env.whisper.example
+++ b/config/env.whisper.example
@@ -409,6 +409,13 @@ MAX_CONCURRENT_UPLOADS=3
# Default: 24.
# RECORDING_SESSION_TTL_HOURS=24
+# How often (seconds) a sliced-upload ingest stamps its session as alive while
+# it reassembles and ingests the file. A session that misses three stamps is
+# treated as abandoned (its worker died, usually a container recreate) and a
+# retry of the same file takes it over instead of waiting out the TTL.
+# Default: 30 (minimum 5).
+# RECORDING_SESSION_INGEST_HEARTBEAT_SECONDS=30
+
# --- Webhooks (optional) ---
# Outbound webhooks notify external services when events occur. Configured
# per-user in the UI.
diff --git a/config/env.whisperx.example b/config/env.whisperx.example
index ba16794b..57850390 100644
--- a/config/env.whisperx.example
+++ b/config/env.whisperx.example
@@ -107,6 +107,15 @@ ASR_DIARIZE=true
# Enable speaker embeddings for voice profile matching (WhisperX only)
ASR_RETURN_SPEAKER_EMBEDDINGS=true
+# Voice embedding compatibility check
+# Voice profiles are only comparable with embeddings from the model that made
+# them. If the backend starts returning embeddings from a different model,
+# existing profiles silently stop matching. Speakr detects that at startup by
+# sending a short bundled clip and comparing the result with a stored
+# reference, and on demand from the admin page. Set to true to disable it.
+# Costs one short transcription per run.
+# DISABLE_VOICE_EMBEDDING_CHECK=false
+
# --- Application Settings ---
# Set to "true" to allow user registration, "false" to disable
ALLOW_REGISTRATION=false
diff --git a/docs/features.md b/docs/features.md
index 97c248b3..5cc564cf 100644
--- a/docs/features.md
+++ b/docs/features.md
@@ -135,7 +135,7 @@ Build and maintain a library of speaker profiles that persist across recordings.
**Embedding Model Changes**: Voice profiles are only comparable with embeddings from the model that produced them. If the transcription backend starts returning embeddings from a different model, whether because the endpoint was repointed or because the service upgraded itself, existing profiles stop matching anything. On its own this failure is silent: matching simply returns nothing.
-Speakr detects it by sending a short fixed clip to the backend and comparing the embedding it gets back against the one recorded when voice matching first worked. The check runs at startup, which is when an embedding model realistically changes, and on demand from the admin area. When it detects a change, Speakr writes a banner into the startup log and raises a notification for every administrator, keeping the original reference so that restoring the previous backend clears both by itself. If the change was intended, rebuild the affected voice profiles and then re-baseline to accept the new model. A backend that is simply unreachable is reported as a failed check rather than a changed model.
+Speakr detects it by sending a short fixed clip to the backend and comparing the embedding it gets back against the one recorded when voice matching first worked. The check runs at startup, which is when an embedding model realistically changes, and on demand from the **Voice embedding compatibility** card on the Admin page, which also shows the current verdict, the embedding size and when it was last checked. When it detects a change, Speakr writes a banner into the startup log and raises a notification for every administrator, keeping the original reference so that restoring the previous backend clears both by itself. If the change was intended, rebuild the affected voice profiles and then use **Re-baseline** on that card to accept the new model; it asks for confirmation, because it discards the reference the old profiles were built against. A backend that is simply unreachable is reported as a failed check rather than a changed model.
Set `DISABLE_VOICE_EMBEDDING_CHECK=true` to turn the check off. The clip costs one short transcription each time it runs.
diff --git a/src/services/voice_embedding_check.py b/src/services/voice_embedding_check.py
index 48a38355..d002637e 100644
--- a/src/services/voice_embedding_check.py
+++ b/src/services/voice_embedding_check.py
@@ -336,7 +336,7 @@ def _raise_notification(app, detail):
admins=True,
level='error',
params={'detail': detail or ''},
- link='/admin',
+ link='/admin#voice-embeddings',
)
except Exception as e:
logger.warning('Could not raise the voice embedding notification: %s', e)
diff --git a/static/locales/de.json b/static/locales/de.json
index 0eb4a6af..8e290b70 100644
--- a/static/locales/de.json
+++ b/static/locales/de.json
@@ -162,13 +162,22 @@
"tagPrompts": "Wenn mehrere Tag-Prompts existieren, werden sie in der Reihenfolge zusammengeführt, in der die Tags hinzugefügt wurden",
"transcriptLimit": "Transkripte sind auf eine konfigurierbare Zeichenanzahl begrenzt (Standard: 30.000)"
},
+ "contextualSpeakerPromptDesc": "Anleitung, der das Modell folgt, wenn es Sprecher anhand des Gesprächskontexts zuordnet; nur für Transkriptions-Engines verwendet, die Sprecher trennen, ohne Stimmprofile zurückzugeben. Die Liste der gespeicherten Sprechernamen des Benutzers und das JSON-Ausgabeformat werden automatisch nach diesem Text hinzugefügt. Leer lassen, um den integrierten Standard zu verwenden.",
+ "contextualSpeakerPromptPlaceholder": "Leer lassen, um die integrierte Standardanleitung zu verwenden.",
+ "contextualSpeakerPromptTitle": "Prompt für kontextbasierte Sprecherzuordnung",
"createFirstGroup": "Erste Gruppe erstellen",
"created": "Erstellt",
"currentUsage": "Aktuelle Nutzung",
"currentUsageMinutes": "Aktuelle Nutzung",
+ "defaultHotwordsDesc": "Durch Kommas getrennte Wörter, um die Erkennung domänenspezifischer Begriffe zu verbessern.",
+ "defaultHotwordsLabel": "Standard-Hotwords",
+ "defaultInitialPromptDesc": "Wird an die Transkriptions-Engine gesendet, um die Erkennung zu steuern (z. B. erwartetes Thema oder Vokabular).",
+ "defaultInitialPromptLabel": "Standard-Initial-Prompt",
"defaultPromptInfo": "Dieser Standard-Prompt wird für alle Benutzer verwendet, die keinen eigenen benutzerdefinierten Prompt in ihren Kontoeinstellungen festgelegt haben.",
"defaultPrompts": "Standard-Prompts",
"defaultSummarizationPrompt": "Standard-Zusammenfassungsprompt",
+ "defaultTranscriptionHints": "Standard-Transkriptionshinweise",
+ "defaultTranscriptionHintsInfo": "Globaler Initial-Prompt und Hotwords, die bei jeder Transkription angewendet werden, wenn ein Benutzer keine eigenen festgelegt hat. Persönliche Werte der Benutzer haben immer Vorrang.",
"description": "Beschreibung",
"editUser": "Benutzer Bearbeiten",
"email": "E-MAIL",
@@ -314,17 +323,20 @@
"vectorStoreManagement": "Vektorspeicher-Verwaltung",
"vectorStoreUpToDate": "Der Vektorspeicher ist auf dem neuesten Stand.",
"viewFullPromptStructure": "Vollständige LLM-Prompt-Struktur anzeigen",
+ "voiceEmbedding": {
+ "checkNow": "Jetzt prüfen",
+ "dimension": "Dimensionen",
+ "help": "Prüft, ob der Transkriptionsdienst weiterhin Stimm-Embeddings liefert, die zu den gespeicherten Stimmprofilen passen, indem ein kurzer mitgelieferter Clip gesendet und das Ergebnis mit einer Referenz verglichen wird. Läuft beim Start; mit „Jetzt prüfen“ erneut ausführen.",
+ "lastChecked": "Zuletzt geprüft",
+ "rebaseline": "Referenz neu setzen",
+ "rebaselineConfirm": "Das Neusetzen übernimmt das aktuelle Backend als neue Referenz. Vorhandene Stimmprofile aus dem vorherigen Modell werden nicht mehr gemeldet, und das Wiederherstellen dieses Backends macht dies nicht rückgängig. Erstellen Sie die betroffenen Profile zuerst neu. Fortfahren?",
+ "statusChanged": "Modell geändert",
+ "statusOk": "Kompatibel",
+ "statusUnknown": "Nicht geprüft",
+ "title": "Kompatibilität der Stimm-Embeddings"
+ },
"warning": "Warnung",
- "yes": "Ja",
- "defaultTranscriptionHints": "Standard-Transkriptionshinweise",
- "defaultTranscriptionHintsInfo": "Globaler Initial-Prompt und Hotwords, die bei jeder Transkription angewendet werden, wenn ein Benutzer keine eigenen festgelegt hat. Persönliche Werte der Benutzer haben immer Vorrang.",
- "defaultInitialPromptLabel": "Standard-Initial-Prompt",
- "defaultInitialPromptDesc": "Wird an die Transkriptions-Engine gesendet, um die Erkennung zu steuern (z. B. erwartetes Thema oder Vokabular).",
- "defaultHotwordsLabel": "Standard-Hotwords",
- "defaultHotwordsDesc": "Durch Kommas getrennte Wörter, um die Erkennung domänenspezifischer Begriffe zu verbessern.",
- "contextualSpeakerPromptTitle": "Prompt für kontextbasierte Sprecherzuordnung",
- "contextualSpeakerPromptDesc": "Anleitung, der das Modell folgt, wenn es Sprecher anhand des Gesprächskontexts zuordnet; nur für Transkriptions-Engines verwendet, die Sprecher trennen, ohne Stimmprofile zurückzugeben. Die Liste der gespeicherten Sprechernamen des Benutzers und das JSON-Ausgabeformat werden automatisch nach diesem Text hinzugefügt. Leer lassen, um den integrierten Standard zu verwenden.",
- "contextualSpeakerPromptPlaceholder": "Leer lassen, um die integrierte Standardanleitung zu verwenden."
+ "yes": "Ja"
},
"apiTokens": {
"activeTokens": "Aktive Token",
diff --git a/static/locales/en.json b/static/locales/en.json
index a0d90880..dbedc9fb 100644
--- a/static/locales/en.json
+++ b/static/locales/en.json
@@ -162,13 +162,22 @@
"tagPrompts": "If multiple tag prompts exist, they are merged in the order tags were added",
"transcriptLimit": "Transcripts are limited to a configurable character count (default: 30,000)"
},
+ "contextualSpeakerPromptDesc": "Guidance the model follows when it labels speakers from the conversation context, used only for transcription engines that diarize without returning voice fingerprints. The list of the user's saved speaker names and the JSON output format are added automatically after this text. Leave blank to use the built-in default.",
+ "contextualSpeakerPromptPlaceholder": "Leave blank to use the built-in default guidance.",
+ "contextualSpeakerPromptTitle": "Contextual Speaker Labelling Prompt",
"createFirstGroup": "Create Your First Group",
"created": "Created",
"currentUsage": "Current usage",
"currentUsageMinutes": "Current Usage",
+ "defaultHotwordsDesc": "Comma-separated words to bias recognition of domain-specific terms.",
+ "defaultHotwordsLabel": "Default Hotwords",
+ "defaultInitialPromptDesc": "Sent to the transcription engine to steer recognition (for example, the expected topic or vocabulary).",
+ "defaultInitialPromptLabel": "Default Initial Prompt",
"defaultPromptInfo": "This default prompt will be used for all users who haven't set their own custom prompt in their account settings.",
"defaultPrompts": "Default Prompts",
"defaultSummarizationPrompt": "Default Summarization Prompt",
+ "defaultTranscriptionHints": "Default Transcription Hints",
+ "defaultTranscriptionHintsInfo": "Global initial prompt and hotwords applied to every transcription when a user has not set their own. Users' personal values always take precedence.",
"description": "Description",
"editUser": "Edit User",
"email": "EMAIL",
@@ -314,17 +323,20 @@
"vectorStoreManagement": "Vector Store Management",
"vectorStoreUpToDate": "The vector store is up to date.",
"viewFullPromptStructure": "View Full LLM Prompt Structure",
+ "voiceEmbedding": {
+ "checkNow": "Check now",
+ "dimension": "Dimensions",
+ "help": "Checks that the transcription backend still produces voice embeddings compatible with the stored voice profiles, by sending a short bundled clip and comparing the result with a reference. Runs at startup; use Check now to run it again.",
+ "lastChecked": "Last checked",
+ "rebaseline": "Re-baseline",
+ "rebaselineConfirm": "Re-baselining accepts the current backend as the new reference. Existing voice profiles built against the previous model will no longer be flagged, and restoring that backend will not undo this. Rebuild the affected profiles first. Continue?",
+ "statusChanged": "Model changed",
+ "statusOk": "Compatible",
+ "statusUnknown": "Not checked",
+ "title": "Voice embedding compatibility"
+ },
"warning": "warning",
- "yes": "Yes",
- "defaultTranscriptionHints": "Default Transcription Hints",
- "defaultTranscriptionHintsInfo": "Global initial prompt and hotwords applied to every transcription when a user has not set their own. Users' personal values always take precedence.",
- "defaultInitialPromptLabel": "Default Initial Prompt",
- "defaultInitialPromptDesc": "Sent to the transcription engine to steer recognition (for example, the expected topic or vocabulary).",
- "defaultHotwordsLabel": "Default Hotwords",
- "defaultHotwordsDesc": "Comma-separated words to bias recognition of domain-specific terms.",
- "contextualSpeakerPromptTitle": "Contextual Speaker Labelling Prompt",
- "contextualSpeakerPromptDesc": "Guidance the model follows when it labels speakers from the conversation context, used only for transcription engines that diarize without returning voice fingerprints. The list of the user's saved speaker names and the JSON output format are added automatically after this text. Leave blank to use the built-in default.",
- "contextualSpeakerPromptPlaceholder": "Leave blank to use the built-in default guidance."
+ "yes": "Yes"
},
"apiTokens": {
"activeTokens": "Active Tokens",
diff --git a/static/locales/es.json b/static/locales/es.json
index bf87e4e1..7d1f72cd 100644
--- a/static/locales/es.json
+++ b/static/locales/es.json
@@ -162,13 +162,22 @@
"tagPrompts": "Si existen múltiples indicaciones de etiquetas, se fusionan en el orden en que se agregaron las etiquetas",
"transcriptLimit": "Las transcripciones están limitadas a un número configurable de caracteres (predeterminado: 30,000)"
},
+ "contextualSpeakerPromptDesc": "Guía que sigue el modelo al etiquetar hablantes a partir del contexto de la conversación, utilizada solo para motores de transcripción que separan hablantes sin devolver huellas de voz. La lista de nombres de hablantes guardados del usuario y el formato de salida JSON se añaden automáticamente después de este texto. Déjelo en blanco para usar el valor predeterminado integrado.",
+ "contextualSpeakerPromptPlaceholder": "Déjelo en blanco para usar la guía predeterminada integrada.",
+ "contextualSpeakerPromptTitle": "Indicación para el etiquetado contextual de hablantes",
"createFirstGroup": "Crear su primer grupo",
"created": "Creado",
"currentUsage": "Uso actual",
"currentUsageMinutes": "Uso Actual",
+ "defaultHotwordsDesc": "Palabras separadas por comas para favorecer el reconocimiento de términos específicos del dominio.",
+ "defaultHotwordsLabel": "Palabras clave predeterminadas",
+ "defaultInitialPromptDesc": "Se envía al motor de transcripción para guiar el reconocimiento (por ejemplo, el tema o vocabulario esperado).",
+ "defaultInitialPromptLabel": "Prompt inicial predeterminado",
"defaultPromptInfo": "Este prompt predeterminado se utilizará para todos los usuarios que no hayan establecido su propio prompt personalizado en la configuración de su cuenta.",
"defaultPrompts": "Prompts por Defecto",
"defaultSummarizationPrompt": "Prompt de Resumen Predeterminado",
+ "defaultTranscriptionHints": "Sugerencias de transcripción predeterminadas",
+ "defaultTranscriptionHintsInfo": "Prompt inicial y palabras clave globales aplicados a cada transcripción cuando un usuario no ha definido los suyos. Los valores personales de los usuarios siempre tienen prioridad.",
"description": "Descripción",
"editUser": "Editar Usuario",
"email": "E-MAIL",
@@ -314,17 +323,20 @@
"vectorStoreManagement": "Gestión del Almacén Vectorial",
"vectorStoreUpToDate": "El almacén de vectores está actualizado.",
"viewFullPromptStructure": "Ver Estructura Completa del Prompt LLM",
+ "voiceEmbedding": {
+ "checkNow": "Comprobar ahora",
+ "dimension": "Dimensiones",
+ "help": "Comprueba que el servicio de transcripción sigue produciendo incrustaciones de voz compatibles con los perfiles de voz guardados, enviando un clip breve incluido y comparando el resultado con una referencia. Se ejecuta al iniciar; use Comprobar ahora para repetirlo.",
+ "lastChecked": "Última comprobación",
+ "rebaseline": "Restablecer referencia",
+ "rebaselineConfirm": "Restablecer la referencia acepta el backend actual como nueva referencia. Los perfiles de voz creados con el modelo anterior dejarán de señalarse, y restaurar ese backend no lo deshará. Reconstruya primero los perfiles afectados. ¿Continuar?",
+ "statusChanged": "Modelo cambiado",
+ "statusOk": "Compatible",
+ "statusUnknown": "Sin comprobar",
+ "title": "Compatibilidad de las incrustaciones de voz"
+ },
"warning": "advertencia",
- "yes": "Sí",
- "defaultTranscriptionHints": "Sugerencias de transcripción predeterminadas",
- "defaultTranscriptionHintsInfo": "Prompt inicial y palabras clave globales aplicados a cada transcripción cuando un usuario no ha definido los suyos. Los valores personales de los usuarios siempre tienen prioridad.",
- "defaultInitialPromptLabel": "Prompt inicial predeterminado",
- "defaultInitialPromptDesc": "Se envía al motor de transcripción para guiar el reconocimiento (por ejemplo, el tema o vocabulario esperado).",
- "defaultHotwordsLabel": "Palabras clave predeterminadas",
- "defaultHotwordsDesc": "Palabras separadas por comas para favorecer el reconocimiento de términos específicos del dominio.",
- "contextualSpeakerPromptTitle": "Indicación para el etiquetado contextual de hablantes",
- "contextualSpeakerPromptDesc": "Guía que sigue el modelo al etiquetar hablantes a partir del contexto de la conversación, utilizada solo para motores de transcripción que separan hablantes sin devolver huellas de voz. La lista de nombres de hablantes guardados del usuario y el formato de salida JSON se añaden automáticamente después de este texto. Déjelo en blanco para usar el valor predeterminado integrado.",
- "contextualSpeakerPromptPlaceholder": "Déjelo en blanco para usar la guía predeterminada integrada."
+ "yes": "Sí"
},
"apiTokens": {
"activeTokens": "Tokens activos",
diff --git a/static/locales/fr.json b/static/locales/fr.json
index 11752119..4232c6f5 100644
--- a/static/locales/fr.json
+++ b/static/locales/fr.json
@@ -162,13 +162,22 @@
"tagPrompts": "Si plusieurs invites d'étiquettes existent, elles sont fusionnées dans l'ordre où les étiquettes ont été ajoutées",
"transcriptLimit": "Les transcriptions sont limitées à un nombre configurable de caractères (par défaut : 30 000)"
},
+ "contextualSpeakerPromptDesc": "Instructions que le modèle suit lorsqu'il étiquette les locuteurs à partir du contexte de la conversation, utilisées uniquement pour les moteurs de transcription qui distinguent les locuteurs sans renvoyer d'empreintes vocales. La liste des noms de locuteurs enregistrés par l'utilisateur et le format de sortie JSON sont ajoutés automatiquement après ce texte. Laissez vide pour utiliser la valeur par défaut intégrée.",
+ "contextualSpeakerPromptPlaceholder": "Laissez vide pour utiliser les instructions par défaut intégrées.",
+ "contextualSpeakerPromptTitle": "Invite pour l'étiquetage contextuel des locuteurs",
"createFirstGroup": "Créer votre premier groupe",
"created": "Créé",
"currentUsage": "Utilisation actuelle",
"currentUsageMinutes": "Utilisation Actuelle",
+ "defaultHotwordsDesc": "Mots séparés par des virgules pour favoriser la reconnaissance de termes spécifiques au domaine.",
+ "defaultHotwordsLabel": "Mots-clés par défaut",
+ "defaultInitialPromptDesc": "Envoyé au moteur de transcription pour orienter la reconnaissance (par exemple le sujet ou le vocabulaire attendu).",
+ "defaultInitialPromptLabel": "Prompt initial par défaut",
"defaultPromptInfo": "Cette invite par défaut sera utilisée pour tous les utilisateurs qui n'ont pas défini leur propre invite personnalisée dans les paramètres de leur compte.",
"defaultPrompts": "Invites par Défaut",
"defaultSummarizationPrompt": "Invite de Résumé par Défaut",
+ "defaultTranscriptionHints": "Indications de transcription par défaut",
+ "defaultTranscriptionHintsInfo": "Prompt initial et mots-clés globaux appliqués à chaque transcription lorsque l'utilisateur n'a pas défini les siens. Les valeurs personnelles des utilisateurs sont toujours prioritaires.",
"description": "Description",
"editUser": "Modifier l'Utilisateur",
"email": "E-MAIL",
@@ -314,17 +323,20 @@
"vectorStoreManagement": "Gestion du Magasin Vectoriel",
"vectorStoreUpToDate": "Le magasin de vecteurs est à jour.",
"viewFullPromptStructure": "Voir la Structure Complète de l'Invite LLM",
+ "voiceEmbedding": {
+ "checkNow": "Vérifier maintenant",
+ "dimension": "Dimensions",
+ "help": "Vérifie que le service de transcription produit toujours des empreintes vocales compatibles avec les profils vocaux enregistrés, en envoyant un court extrait fourni et en comparant le résultat à une référence. S'exécute au démarrage ; utilisez Vérifier maintenant pour relancer.",
+ "lastChecked": "Dernière vérification",
+ "rebaseline": "Réinitialiser la référence",
+ "rebaselineConfirm": "La réinitialisation adopte le service actuel comme nouvelle référence. Les profils vocaux créés avec l'ancien modèle ne seront plus signalés, et rétablir ce service ne l'annulera pas. Reconstruisez d'abord les profils concernés. Continuer ?",
+ "statusChanged": "Modèle modifié",
+ "statusOk": "Compatible",
+ "statusUnknown": "Non vérifié",
+ "title": "Compatibilité des empreintes vocales"
+ },
"warning": "avertissement",
- "yes": "Oui",
- "defaultTranscriptionHints": "Indications de transcription par défaut",
- "defaultTranscriptionHintsInfo": "Prompt initial et mots-clés globaux appliqués à chaque transcription lorsque l'utilisateur n'a pas défini les siens. Les valeurs personnelles des utilisateurs sont toujours prioritaires.",
- "defaultInitialPromptLabel": "Prompt initial par défaut",
- "defaultInitialPromptDesc": "Envoyé au moteur de transcription pour orienter la reconnaissance (par exemple le sujet ou le vocabulaire attendu).",
- "defaultHotwordsLabel": "Mots-clés par défaut",
- "defaultHotwordsDesc": "Mots séparés par des virgules pour favoriser la reconnaissance de termes spécifiques au domaine.",
- "contextualSpeakerPromptTitle": "Invite pour l'étiquetage contextuel des locuteurs",
- "contextualSpeakerPromptDesc": "Instructions que le modèle suit lorsqu'il étiquette les locuteurs à partir du contexte de la conversation, utilisées uniquement pour les moteurs de transcription qui distinguent les locuteurs sans renvoyer d'empreintes vocales. La liste des noms de locuteurs enregistrés par l'utilisateur et le format de sortie JSON sont ajoutés automatiquement après ce texte. Laissez vide pour utiliser la valeur par défaut intégrée.",
- "contextualSpeakerPromptPlaceholder": "Laissez vide pour utiliser les instructions par défaut intégrées."
+ "yes": "Oui"
},
"apiTokens": {
"activeTokens": "Jetons actifs",
diff --git a/static/locales/pt-BR.json b/static/locales/pt-BR.json
index e77e26ec..5ceabe91 100644
--- a/static/locales/pt-BR.json
+++ b/static/locales/pt-BR.json
@@ -162,13 +162,22 @@
"tagPrompts": "Se existirem múltiplos prompts de etiqueta, elas são mescladas na ordem em que as etiquetas foram adicionadas",
"transcriptLimit": "As transcrições são limitadas a uma contagem de caracteres configurável (padrão: 30.000)"
},
+ "contextualSpeakerPromptDesc": "Orientação que o modelo segue ao rotular falantes a partir do contexto da conversa, usada apenas para mecanismos de transcrição que separam falantes sem retornar impressões de voz. A lista de nomes de falantes salvos do usuário e o formato de saída JSON são adicionados automaticamente após este texto. Deixe em branco para usar o padrão integrado.",
+ "contextualSpeakerPromptPlaceholder": "Deixe em branco para usar a orientação padrão integrada.",
+ "contextualSpeakerPromptTitle": "Prompt para rotulagem contextual de falantes",
"createFirstGroup": "Crie seu Primeiro Grupo",
"created": "Criado",
"currentUsage": "Uso atual",
"currentUsageMinutes": "Uso Atual",
+ "defaultHotwordsDesc": "Palavras separadas por vírgulas para favorecer o reconhecimento de termos específicos do domínio.",
+ "defaultHotwordsLabel": "Hotwords padrão",
+ "defaultInitialPromptDesc": "Enviado ao mecanismo de transcrição para orientar o reconhecimento (por exemplo, o tema ou vocabulário esperado).",
+ "defaultInitialPromptLabel": "Prompt inicial padrão",
"defaultPromptInfo": "Esta instrução padrão será usada para todos os usuários que não configuraram sua própria instrução personalizada nas configurações da conta.",
"defaultPrompts": "Instruções Padrão",
"defaultSummarizationPrompt": "Instrução de Resumo Padrão",
+ "defaultTranscriptionHints": "Dicas de transcrição padrão",
+ "defaultTranscriptionHintsInfo": "Prompt inicial e hotwords globais aplicados a cada transcrição quando o usuário não definiu os seus. Os valores pessoais dos usuários sempre têm prioridade.",
"description": "Descrição",
"editUser": "Editar Usuário",
"email": "EMAIL",
@@ -314,17 +323,20 @@
"vectorStoreManagement": "Gerenciamento do Armazenamento Vetorial",
"vectorStoreUpToDate": "O armazenamento vetorial está atualizado.",
"viewFullPromptStructure": "Ver Estrutura Completa da Instrução do LLM",
+ "voiceEmbedding": {
+ "checkNow": "Verificar agora",
+ "dimension": "Dimensões",
+ "help": "Verifica se o serviço de transcrição continua produzindo embeddings de voz compatíveis com os perfis de voz salvos, enviando um clipe curto incluído e comparando o resultado com uma referência. Executa na inicialização; use Verificar agora para repetir.",
+ "lastChecked": "Última verificação",
+ "rebaseline": "Redefinir referência",
+ "rebaselineConfirm": "Redefinir a referência aceita o backend atual como nova referência. Os perfis de voz criados com o modelo anterior deixarão de ser sinalizados, e restaurar aquele backend não desfará isso. Reconstrua primeiro os perfis afetados. Continuar?",
+ "statusChanged": "Modelo alterado",
+ "statusOk": "Compatível",
+ "statusUnknown": "Não verificado",
+ "title": "Compatibilidade das embeddings de voz"
+ },
"warning": "aviso",
- "yes": "Sim",
- "defaultTranscriptionHints": "Dicas de transcrição padrão",
- "defaultTranscriptionHintsInfo": "Prompt inicial e hotwords globais aplicados a cada transcrição quando o usuário não definiu os seus. Os valores pessoais dos usuários sempre têm prioridade.",
- "defaultInitialPromptLabel": "Prompt inicial padrão",
- "defaultInitialPromptDesc": "Enviado ao mecanismo de transcrição para orientar o reconhecimento (por exemplo, o tema ou vocabulário esperado).",
- "defaultHotwordsLabel": "Hotwords padrão",
- "defaultHotwordsDesc": "Palavras separadas por vírgulas para favorecer o reconhecimento de termos específicos do domínio.",
- "contextualSpeakerPromptTitle": "Prompt para rotulagem contextual de falantes",
- "contextualSpeakerPromptDesc": "Orientação que o modelo segue ao rotular falantes a partir do contexto da conversa, usada apenas para mecanismos de transcrição que separam falantes sem retornar impressões de voz. A lista de nomes de falantes salvos do usuário e o formato de saída JSON são adicionados automaticamente após este texto. Deixe em branco para usar o padrão integrado.",
- "contextualSpeakerPromptPlaceholder": "Deixe em branco para usar a orientação padrão integrada."
+ "yes": "Sim"
},
"apiTokens": {
"activeTokens": "Tokens Ativos",
diff --git a/static/locales/ru.json b/static/locales/ru.json
index 698ae6fa..745ff2f7 100644
--- a/static/locales/ru.json
+++ b/static/locales/ru.json
@@ -162,13 +162,22 @@
"tagPrompts": "Если существует несколько запросов тегов, они объединяются в порядке добавления тегов",
"transcriptLimit": "Транскрипты ограничены настраиваемым количеством символов (по умолчанию: 30 000)"
},
+ "contextualSpeakerPromptDesc": "Руководство, которому следует модель при определении говорящих по контексту разговора; используется только для движков транскрипции, которые разделяют говорящих, но не возвращают голосовые отпечатки. Список сохранённых имён говорящих пользователя и формат вывода JSON добавляются автоматически после этого текста. Оставьте пустым, чтобы использовать встроенное значение по умолчанию.",
+ "contextualSpeakerPromptPlaceholder": "Оставьте пустым, чтобы использовать встроенное руководство по умолчанию.",
+ "contextualSpeakerPromptTitle": "Промпт для контекстного определения говорящих",
"createFirstGroup": "Создать первую группу",
"created": "Создано",
"currentUsage": "Текущее использование",
"currentUsageMinutes": "Текущее использование",
+ "defaultHotwordsDesc": "Слова через запятую для улучшения распознавания узкоспециальных терминов.",
+ "defaultHotwordsLabel": "Ключевые слова по умолчанию",
+ "defaultInitialPromptDesc": "Отправляется в движок транскрипции для управления распознаванием (например, ожидаемая тема или лексика).",
+ "defaultInitialPromptLabel": "Начальный промпт по умолчанию",
"defaultPromptInfo": "Этот запрос по умолчанию будет использоваться для всех пользователей, которые не настроили свой собственный в настройках аккаунта.",
"defaultPrompts": "Запросы по умолчанию",
"defaultSummarizationPrompt": "Запрос резюмирования по умолчанию",
+ "defaultTranscriptionHints": "Подсказки транскрипции по умолчанию",
+ "defaultTranscriptionHintsInfo": "Глобальный начальный промпт и ключевые слова, применяемые к каждой транскрипции, когда пользователь не задал свои. Личные значения пользователей всегда имеют приоритет.",
"description": "Описание",
"editUser": "Редактировать пользователя",
"email": "EMAIL",
@@ -314,17 +323,20 @@
"vectorStoreManagement": "Управление векторным хранилищем",
"vectorStoreUpToDate": "Векторное хранилище актуально.",
"viewFullPromptStructure": "Показать полную структуру запросов LLM",
+ "voiceEmbedding": {
+ "checkNow": "Проверить сейчас",
+ "dimension": "Размерность",
+ "help": "Проверяет, что сервис расшифровки по-прежнему выдаёт голосовые эмбеддинги, совместимые с сохранёнными голосовыми профилями: отправляет короткий встроенный клип и сравнивает результат с эталоном. Выполняется при запуске; «Проверить сейчас» запускает повторно.",
+ "lastChecked": "Последняя проверка",
+ "rebaseline": "Сбросить эталон",
+ "rebaselineConfirm": "Сброс принимает текущий сервис как новый эталон. Профили, созданные прежней моделью, больше не будут помечаться, и восстановление того сервиса этого не отменит. Сначала перестройте затронутые профили. Продолжить?",
+ "statusChanged": "Модель изменилась",
+ "statusOk": "Совместимо",
+ "statusUnknown": "Не проверялось",
+ "title": "Совместимость голосовых эмбеддингов"
+ },
"warning": "предупреждение",
- "yes": "Да",
- "defaultTranscriptionHints": "Подсказки транскрипции по умолчанию",
- "defaultTranscriptionHintsInfo": "Глобальный начальный промпт и ключевые слова, применяемые к каждой транскрипции, когда пользователь не задал свои. Личные значения пользователей всегда имеют приоритет.",
- "defaultInitialPromptLabel": "Начальный промпт по умолчанию",
- "defaultInitialPromptDesc": "Отправляется в движок транскрипции для управления распознаванием (например, ожидаемая тема или лексика).",
- "defaultHotwordsLabel": "Ключевые слова по умолчанию",
- "defaultHotwordsDesc": "Слова через запятую для улучшения распознавания узкоспециальных терминов.",
- "contextualSpeakerPromptTitle": "Промпт для контекстного определения говорящих",
- "contextualSpeakerPromptDesc": "Руководство, которому следует модель при определении говорящих по контексту разговора; используется только для движков транскрипции, которые разделяют говорящих, но не возвращают голосовые отпечатки. Список сохранённых имён говорящих пользователя и формат вывода JSON добавляются автоматически после этого текста. Оставьте пустым, чтобы использовать встроенное значение по умолчанию.",
- "contextualSpeakerPromptPlaceholder": "Оставьте пустым, чтобы использовать встроенное руководство по умолчанию."
+ "yes": "Да"
},
"apiTokens": {
"activeTokens": "Активные токены",
diff --git a/static/locales/zh.json b/static/locales/zh.json
index 976aa287..1ca673b1 100644
--- a/static/locales/zh.json
+++ b/static/locales/zh.json
@@ -162,13 +162,22 @@
"tagPrompts": "如果存在多个标签提示,它们将按添加标签的顺序合并",
"transcriptLimit": "转录限制为可配置的字符数(默认:30,000)"
},
+ "contextualSpeakerPromptDesc": "模型根据对话上下文标注说话人时所遵循的指导,仅用于在不返回声纹的情况下区分说话人的转录引擎。用户已保存的说话人姓名列表和 JSON 输出格式会自动附加在此文本之后。留空以使用内置默认值。",
+ "contextualSpeakerPromptPlaceholder": "留空以使用内置的默认指导。",
+ "contextualSpeakerPromptTitle": "上下文说话人标注提示词",
"createFirstGroup": "创建您的第一个组",
"created": "创建时间",
"currentUsage": "当前使用量",
"currentUsageMinutes": "当前使用量",
+ "defaultHotwordsDesc": "用逗号分隔的词语,用于提高对特定领域术语的识别。",
+ "defaultHotwordsLabel": "默认热词",
+ "defaultInitialPromptDesc": "发送给转录引擎以引导识别(例如预期的主题或词汇)。",
+ "defaultInitialPromptLabel": "默认初始提示",
"defaultPromptInfo": "此默认提示将用于所有未在账户设置中设置自定义提示的用户。",
"defaultPrompts": "默认提示",
"defaultSummarizationPrompt": "默认摘要提示",
+ "defaultTranscriptionHints": "默认转录提示",
+ "defaultTranscriptionHintsInfo": "当用户未设置自己的值时,应用于每次转录的全局初始提示和热词。用户的个人设置始终优先。",
"description": "描述",
"editUser": "编辑用户",
"email": "邮箱",
@@ -314,17 +323,20 @@
"vectorStoreManagement": "向量存储管理",
"vectorStoreUpToDate": "向量存储是最新的",
"viewFullPromptStructure": "查看完整的 LLM 提示结构",
+ "voiceEmbedding": {
+ "checkNow": "立即检查",
+ "dimension": "维度",
+ "help": "通过发送一段内置的短音频并与参考值比较,检查转录服务返回的声纹特征是否仍与已保存的声纹档案兼容。启动时自动运行;点击“立即检查”可再次运行。",
+ "lastChecked": "上次检查",
+ "rebaseline": "重置参考值",
+ "rebaselineConfirm": "重置参考值会将当前后端作为新的参考。基于旧模型创建的声纹档案将不再被标记,恢复旧后端也无法撤销此操作。请先重建受影响的档案。是否继续?",
+ "statusChanged": "模型已更改",
+ "statusOk": "兼容",
+ "statusUnknown": "未检查",
+ "title": "声纹特征兼容性"
+ },
"warning": "警告",
- "yes": "是",
- "defaultTranscriptionHints": "默认转录提示",
- "defaultTranscriptionHintsInfo": "当用户未设置自己的值时,应用于每次转录的全局初始提示和热词。用户的个人设置始终优先。",
- "defaultInitialPromptLabel": "默认初始提示",
- "defaultInitialPromptDesc": "发送给转录引擎以引导识别(例如预期的主题或词汇)。",
- "defaultHotwordsLabel": "默认热词",
- "defaultHotwordsDesc": "用逗号分隔的词语,用于提高对特定领域术语的识别。",
- "contextualSpeakerPromptTitle": "上下文说话人标注提示词",
- "contextualSpeakerPromptDesc": "模型根据对话上下文标注说话人时所遵循的指导,仅用于在不返回声纹的情况下区分说话人的转录引擎。用户已保存的说话人姓名列表和 JSON 输出格式会自动附加在此文本之后。留空以使用内置默认值。",
- "contextualSpeakerPromptPlaceholder": "留空以使用内置的默认指导。"
+ "yes": "是"
},
"apiTokens": {
"activeTokens": "活跃令牌",
diff --git a/templates/admin.html b/templates/admin.html
index 046a8efa..3b891efd 100644
--- a/templates/admin.html
+++ b/templates/admin.html
@@ -431,6 +431,35 @@
</div>
</div>
</div>
+
+ <!-- Voice embedding compatibility (#380). The admin
+ notification's link lands on this anchor. -->
+ <div id="voice-embeddings" v-if="voiceEmbedding.supported !== false"
+ class="bg-[var(--bg-tertiary)] p-4 rounded-lg border border-[var(--border-primary)] shadow-sm">
+ <h4 class="text-md font-medium text-[var(--text-secondary)] mb-1">${t('adminDashboard.voiceEmbedding.title')}</h4>
+ <p class="text-xs text-[var(--text-muted)] mb-3">${t('adminDashboard.voiceEmbedding.help')}</p>
+ <div class="flex flex-wrap items-center gap-3 mb-3">
+ <span class="px-2 py-1 rounded text-xs font-semibold"
+ :class="voiceEmbedding.status === 'ok' ? 'bg-[var(--bg-success)] text-[var(--text-success-strong)]' : (voiceEmbedding.status === 'changed' ? 'bg-[var(--bg-danger)] text-[var(--text-danger-strong)]' : 'bg-[var(--bg-secondary)] text-[var(--text-muted)]')"
+ v-text="voiceEmbedding.status === 'ok' ? t('adminDashboard.voiceEmbedding.statusOk') : (voiceEmbedding.status === 'changed' ? t('adminDashboard.voiceEmbedding.statusChanged') : t('adminDashboard.voiceEmbedding.statusUnknown'))"></span>
+ <span v-if="voiceEmbedding.dimension" class="text-sm text-[var(--text-secondary)]">
+ ${t('adminDashboard.voiceEmbedding.dimension')}: <span class="font-medium" v-text="voiceEmbedding.dimension"></span>
+ </span>
+ <span v-if="voiceEmbedding.checked_at" class="text-sm text-[var(--text-muted)]">
+ ${t('adminDashboard.voiceEmbedding.lastChecked')}: <span v-text="formatDate(voiceEmbedding.checked_at)"></span>
+ </span>
+ </div>
+ <!-- Diagnostic string from the checker, shown as-is like a log line. -->
+ <p v-if="voiceEmbedding.detail" class="text-xs text-[var(--text-muted)] mb-3 font-mono break-words" v-text="voiceEmbedding.detail"></p>
+ <div class="flex flex-wrap gap-2">
+ <button @click="checkVoiceEmbedding" :disabled="voiceEmbeddingBusy" class="btn btn--sm btn--ghost">
+ <i class="fas fa-sync-alt mr-1" :class="{ 'fa-spin': voiceEmbeddingBusy }"></i>${t('adminDashboard.voiceEmbedding.checkNow')}
+ </button>
+ <button @click="rebaselineVoiceEmbedding" :disabled="voiceEmbeddingBusy" class="btn btn--sm btn--danger">
+ <i class="fas fa-redo mr-1"></i>${t('adminDashboard.voiceEmbedding.rebaseline')}
+ </button>
+ </div>
+ </div>
</div>
<!-- Token Usage Section -->
@@ -2088,6 +2117,10 @@ Summarization Instructions:
users_at_100_percent: 0
});
const tokenUserStats = ref([]);
+ // Voice embedding compatibility (#380). Reads the stored verdict;
+ // a probe costs a real transcription so it only runs on the button.
+ const voiceEmbedding = ref({ status: 'unknown', supported: null, dimension: null, checked_at: null, detail: null });
+ const voiceEmbeddingBusy = ref(false);
const transcriptionStats = ref({
today: { seconds: 0, minutes: 0, cost: 0 },
current_month: { seconds: 0, minutes: 0, cost: 0 },
@@ -2418,6 +2451,36 @@ Summarization Instructions:
}
};
+ const loadVoiceEmbedding = async () => {
+ try {
+ const r = await fetch('/admin/voice-embeddings/status');
+ if (r.ok) voiceEmbedding.value = await r.json();
+ } catch (e) { /* card just keeps its last state */ }
+ };
+ const _voiceEmbeddingPost = async (path) => {
+ voiceEmbeddingBusy.value = true;
+ try {
+ const r = await fetch(path, {
+ method: 'POST',
+ headers: { 'X-CSRFToken': document.querySelector('meta[name="csrf-token"]').getAttribute('content') },
+ });
+ const data = await r.json();
+ if (!r.ok) throw new Error(data.error || `HTTP ${r.status}`);
+ voiceEmbedding.value = data;
+ } catch (e) {
+ alert(e.message); // how every other action on this page reports failure
+ } finally {
+ voiceEmbeddingBusy.value = false;
+ }
+ };
+ const checkVoiceEmbedding = () => _voiceEmbeddingPost('/admin/voice-embeddings/check');
+ const rebaselineVoiceEmbedding = () => {
+ // Discards the reference the existing profiles were built
+ // against; restoring the old backend cannot undo it.
+ if (!confirm(t('adminDashboard.voiceEmbedding.rebaselineConfirm'))) return;
+ return _voiceEmbeddingPost('/admin/voice-embeddings/rebaseline');
+ };
+
const loadStats = async () => {
try {
const response = await fetch('/admin/stats');
@@ -3764,6 +3827,7 @@ Summarization Instructions:
if (!isTeamAdminOnly.value) {
loadUsers();
loadStats();
+ loadVoiceEmbedding();
loadTokenStats();
loadTranscriptionStats();
@@ -3864,6 +3928,7 @@ Summarization Instructions:
activeTab,
users,
stats,
+ voiceEmbedding, voiceEmbeddingBusy, checkVoiceEmbedding, rebaselineVoiceEmbedding,
tokenStats,
tokenUserStats,
transcriptionStats,