Speakr is a personal, self-hosted web application designed for transcribing audio recordings
Python
fix: report an HTML error page as an expired session instead of a raw JSON parse error when reprocessing (#388)
Murtaza Nasir6b150eea9f3d
diff --git a/static/js/modules/composables/reprocess.js b/static/js/modules/composables/reprocess.jsindex fbc5e2e6..869a6bc3 100644--- a/static/js/modules/composables/reprocess.js+++ b/static/js/modules/composables/reprocess.js@@ -4,6 +4,7 @@*/import * as IncognitoStorage from '../db/incognito-storage.js';+import { readJsonResponse } from '../utils/response.js';export function useReprocess(state, utils) {const { nextTick } = Vue;@@ -20,6 +21,7 @@ export function useReprocess(state, utils) {} = state;const { showToast, setGlobalError, onChatComplete } = utils;+ const t = (key, params) => (utils.t ? utils.t(key, params) : key);// Store for active polling intervalsconst reprocessingPolls = new Map();@@ -102,8 +104,7 @@ export function useReprocess(state, utils) {}});- const data = await response.json();- if (!response.ok) throw new Error(data.error || 'Failed to reset recording status');+ const data = await readJsonResponse(response, t, 'errors.resetStatusFailed');// Update recording status in listconst index = recordings.value.findIndex(r => r.id === recordingId);@@ -181,8 +182,7 @@ export function useReprocess(state, utils) {body: JSON.stringify(requestBody)});- const data = await response.json();- if (!response.ok) throw new Error(data.error || 'Failed to start transcription reprocessing');+ const data = await readJsonResponse(response, t, 'errors.reprocessTranscriptionFailed');// Update recording status in listconst index = recordings.value.findIndex(r => r.id === recordingId);@@ -254,8 +254,7 @@ export function useReprocess(state, utils) {body: JSON.stringify(requestBody)});- const data = await response.json();- if (!response.ok) throw new Error(data.error || 'Failed to start summary reprocessing');+ const data = await readJsonResponse(response, t, 'errors.reprocessSummaryFailed');// Update recording status in listconst index = recordings.value.findIndex(r => r.id === recordingId);@@ -327,8 +326,7 @@ export function useReprocess(state, utils) {})});- const data = await response.json();- if (!response.ok) throw new Error(data.error || 'Failed to generate summary');+ const data = await readJsonResponse(response, t, 'errors.generateSummaryFailed');// Update the incognito recording with the new summaryselectedRecording.value.summary = data.summary;@@ -360,8 +358,7 @@ export function useReprocess(state, utils) {body: JSON.stringify(body),});- const data = await response.json();- if (!response.ok) throw new Error(data.error || 'Failed to start summary generation');+ const data = await readJsonResponse(response, t, 'errors.generateSummaryFailed');selectedRecording.value.status = 'SUMMARIZING';@@ -398,9 +395,9 @@ export function useReprocess(state, utils) {try {// Use lightweight status-only endpointconst response = await fetch(`/recording/${recordingId}/status`);- if (!response.ok) throw new Error('Status check failed');-- const statusData = await response.json();+ // Polls every few seconds, so a raw parse error here would+ // repeat until the poll gives up. Same reader as the rest.+ const statusData = await readJsonResponse(response, t, 'errors.statusCheckFailed');// Update status (and audio_ready, when the endpoint reports it)// in the recordings list.diff --git a/static/js/modules/utils/response.js b/static/js/modules/utils/response.jsnew file mode 100644index 00000000..42cff0ec--- /dev/null+++ b/static/js/modules/utils/response.js@@ -0,0 +1,61 @@+/**+ * Reading a fetch Response that is supposed to carry JSON.+ *+ * Callers used to do `const data = await response.json()` before checking+ * `response.ok`. When the server answers with an HTML page instead — a CSRF+ * rejection, a redirect to the login form after the session expired, or a+ * 500 error page — that parse throws, and the parse error is what the user+ * sees: "Failed to start summary reprocessing: Unexpected token '<', "+ * (issue #388). It names neither the real problem nor anything to do about it.+ */++import { isCsrfRejection } from '../csrf.js';++/**+ * Parse a JSON response, or throw an Error whose message a human can act on.+ *+ * @param {Response} response the fetch response+ * @param {Function} t the i18n lookup; messages are localized+ * @param {string} fallbackKey i18n key used when the server said nothing useful+ * @returns {Promise<Object>} the parsed body+ */+export async function readJsonResponse(response, t, fallbackKey = 'errors.requestFailed') {+ const _t = t || ((key) => key);+ // Read as text first. A second .json() on a consumed body throws, and the+ // raw text is what the CSRF heuristic needs anyway.+ let text = '';+ try {+ text = await response.text();+ } catch (e) {+ throw new Error(_t('errors.responseUnreadable'));+ }++ let data = null;+ try {+ data = text ? JSON.parse(text) : null;+ } catch (e) {+ data = null; // Not JSON. Almost always an HTML error page.+ }++ if (response.ok) {+ if (data === null) throw new Error(_t('errors.responseNotJson'));+ return data;+ }++ // Server said no. Work out what actually happened, most specific first.+ if (isCsrfRejection(response.status, text)) {+ const err = new Error(_t('errors.sessionExpiredReload'));+ err.isCsrfRejection = true;+ throw err;+ }+ if (response.status === 401 || response.status === 403 || response.redirected) {+ throw new Error(_t('errors.sessionExpiredReload'));+ }+ if (data && data.error) {+ throw new Error(data.error); // A real JSON error from the app.+ }+ if (response.status >= 500) {+ throw new Error(_t('errors.serverErrorWithStatus', { status: response.status }));+ }+ throw new Error(_t(fallbackKey, { status: response.status }));+}diff --git a/static/js/modules/utils/response.test.js b/static/js/modules/utils/response.test.jsnew file mode 100644index 00000000..9008aece--- /dev/null+++ b/static/js/modules/utils/response.test.js@@ -0,0 +1,84 @@+import { describe, it, expect } from 'vitest';+import { readJsonResponse } from './response.js';++// Minimal stand-in for fetch's Response: the reader only uses these.+const res = ({ ok = true, status = 200, body = '', redirected = false }) => ({+ ok, status, redirected,+ text: async () => body,+});++// Pass the key straight through so assertions read as the key, not prose.+const t = (key, params) => (params ? `${key}:${JSON.stringify(params)}` : key);++describe('readJsonResponse', () => {+ it('returns the parsed body on success', async () => {+ const data = await readJsonResponse(res({ body: '{"id":7,"status":"SUMMARIZING"}' }), t);+ expect(data).toEqual({ id: 7, status: 'SUMMARIZING' });+ });++ it('reports an HTML error page as an expired session, not a parse error', async () => {+ // This is issue #388: the user saw `Unexpected token '<', "` because+ // .json() was called on a login page before checking response.ok.+ const html = '<!doctype html><html><body>CSRF token expired</body></html>';+ await expect(readJsonResponse(res({ ok: false, status: 400, body: html }), t))+ .rejects.toThrow('errors.sessionExpiredReload');+ });++ it('marks a CSRF rejection so callers can retry after refreshing', async () => {+ const html = '<!doctype html><html><body>The CSRF token is missing.</body></html>';+ await expect(readJsonResponse(res({ ok: false, status: 400, body: html }), t))+ .rejects.toMatchObject({ isCsrfRejection: true });+ });++ it('never surfaces a raw JSON parse error', async () => {+ const html = '<!doctype html><h1>500 Internal Server Error</h1>';+ try {+ await readJsonResponse(res({ ok: false, status: 500, body: html }), t);+ throw new Error('should have thrown');+ } catch (e) {+ expect(e.message).not.toMatch(/Unexpected token/);+ expect(e.message).not.toMatch(/JSON/i);+ }+ });++ it('prefers the application error message when the server sent JSON', async () => {+ await expect(readJsonResponse(res({ ok: false, status: 400, body: '{"error":"No valid transcription available"}' }), t))+ .rejects.toThrow('No valid transcription available');+ });++ it('treats a 401 as an expired session', async () => {+ await expect(readJsonResponse(res({ ok: false, status: 401, body: '' }), t))+ .rejects.toThrow('errors.sessionExpiredReload');+ });++ it('treats a redirect to the login page as an expired session', async () => {+ await expect(readJsonResponse(res({ ok: false, status: 200, redirected: true, body: '<html>login</html>' }), t))+ .rejects.toThrow('errors.sessionExpiredReload');+ });++ it('reports a 5xx with its status', async () => {+ await expect(readJsonResponse(res({ ok: false, status: 503, body: '' }), t))+ .rejects.toThrow('errors.serverErrorWithStatus:{"status":503}');+ });++ it('uses the caller fallback key for anything else', async () => {+ await expect(readJsonResponse(res({ ok: false, status: 418, body: '' }), t, 'errors.reprocessSummaryFailed'))+ .rejects.toThrow('errors.reprocessSummaryFailed:{"status":418}');+ });++ it('rejects a 200 whose body is not JSON', async () => {+ await expect(readJsonResponse(res({ ok: true, status: 200, body: '<html>oops</html>' }), t))+ .rejects.toThrow('errors.responseNotJson');+ });++ it('survives a body that cannot be read at all', async () => {+ const broken = { ok: true, status: 200, redirected: false,+ text: async () => { throw new Error('network died'); } };+ await expect(readJsonResponse(broken, t)).rejects.toThrow('errors.responseUnreadable');+ });++ it('works without an i18n function', async () => {+ await expect(readJsonResponse(res({ ok: false, status: 401, body: '' }), null))+ .rejects.toThrow('errors.sessionExpiredReload');+ });+});diff --git a/static/locales/de.json b/static/locales/de.jsonindex e76d9ccd..ac60bcb3 100644--- a/static/locales/de.json+++ b/static/locales/de.json@@ -650,6 +650,7 @@"fileTooLargeMaxSize": "Datei zu groß. Max: {{size}} MB.","fileTooLargeMessage": "Die Audiodatei überschreitet die vom Transkriptionsdienst zugelassene Maximalgröße.","fileTooLargeTitle": "Datei zu groß",+ "generateSummaryFailed": "Die Zusammenfassung konnte nicht gestartet werden (HTTP {status}).","generic": "Ein Fehler ist aufgetreten","invalidAudioFormat": "Ungültiges Audioformat","invalidAudioFormatGuidance": "Versuchen Sie, die Audiodatei vor dem Hochladen in MP3 oder WAV zu konvertieren.",@@ -672,32 +673,41 @@"rateLimitExceeded": "Ratenlimit überschritten","rateLimitExceededGuidance": "Bitte warten Sie einige Minuten und versuchen Sie es erneut.","rateLimitExceededMessage": "Es wurden zu viele Anfragen an den Transkriptionsdienst gesendet.",+ "recordingFinalizeFallback": "Server-seitiges Zusammenführen fehlgeschlagen; Upload als einzelne Datei stattdessen.",+ "recordingNotResumable": "Diese Aufnahme kann nicht mehr fortgesetzt werden.",+ "reprocessSummaryFailed": "Die erneute Zusammenfassung konnte nicht gestartet werden (HTTP {status}).",+ "reprocessTranscriptionFailed": "Die erneute Transkription konnte nicht gestartet werden (HTTP {status}).",+ "requestFailed": "Die Anfrage ist fehlgeschlagen (HTTP {status}). Bitte versuchen Sie es erneut.",+ "resetStatusFailed": "Der Aufnahmestatus konnte nicht zurückgesetzt werden (HTTP {status}).",+ "responseNotJson": "Der Server hat eine unerwartete Antwort gesendet. Bitte laden Sie die Seite neu und versuchen Sie es erneut.",+ "responseUnreadable": "Die Antwort des Servers konnte nicht gelesen werden. Bitte versuchen Sie es erneut.","serverError": "服务器错误。请稍后重试。","serverErrorStatus": "Serverfehler ({{status}})",+ "serverErrorWithStatus": "Der Server hat einen Fehler gemeldet (HTTP {status}). Bitte versuchen Sie es gleich noch einmal.","serviceUnavailable": "Dienst nicht verfügbar","serviceUnavailableGuidance": "Dies ist normalerweise vorübergehend. Bitte versuchen Sie es in ein paar Minuten erneut.","serviceUnavailableMessage": "Der Transkriptionsdienst ist vorübergehend nicht verfügbar.",+ "sessionExpiredReload": "Ihre Sitzung ist abgelaufen. Bitte laden Sie die Seite neu und versuchen Sie es erneut.",+ "shareTargetGeneric": "Die geteilte Audiodatei konnte nicht verarbeitet werden. Bitte direkt hochladen.",+ "shareTarget_missing_file": "Keine Audiodatei beim Teilen angehängt. Bitte vor dem Teilen eine Datei auswählen.",+ "shareTarget_queue_failed": "Die geteilte Audiodatei wurde gespeichert, konnte aber nicht zur Transkription eingereiht werden.",+ "shareTarget_save_failed": "Speakr konnte die geteilte Audiodatei nicht speichern. Bitte direkt hochladen.",+ "shareTarget_too_large": "Die geteilte Audiodatei überschreitet Speakrs Upload-Limit.","splitAudioGuidance": "Versuchen Sie, die Audiodatei in kleinere Teile aufzuteilen",+ "statusCheckFailed": "Der Aufnahmestatus konnte nicht abgefragt werden (HTTP {status}).","summaryFailed": "Zusammenfassung fehlgeschlagen. Bitte erneut versuchen.","transcriptionFailed": "Transkription fehlgeschlagen. Bitte erneut versuchen.","tryAgainLaterGuidance": "Versuchen Sie es in ein paar Minuten erneut","unauthorized": "Nicht autorisiert","unexpectedResponse": "Unerwartete Erfolgsantwort vom Server nach dem Upload.","unsupportedFormat": "Dateiformat nicht unterstützt",+ "uploadBlockedByProxyGuidance": "Erhöhen Sie client_max_body_size auf Ihrem Reverse-Proxy; der Upload hat Speakr nie erreicht, daher hilft Chunking hier nicht",+ "uploadBlockedByProxyTitle": "Upload vom Reverse-Proxy blockiert","uploadFailed": "Upload fehlgeschlagen. Bitte erneut versuchen.","uploadFailedWithStatus": "Upload mit Status {{status}} fehlgeschlagen","uploadTimedOut": "Upload-Zeitüberschreitung","validationError": "Validierungsfehler",- "waitAndRetryGuidance": "Einige Minuten warten und erneut versuchen",- "uploadBlockedByProxyTitle": "Upload vom Reverse-Proxy blockiert",- "uploadBlockedByProxyGuidance": "Erhöhen Sie client_max_body_size auf Ihrem Reverse-Proxy; der Upload hat Speakr nie erreicht, daher hilft Chunking hier nicht",- "shareTargetGeneric": "Die geteilte Audiodatei konnte nicht verarbeitet werden. Bitte direkt hochladen.",- "shareTarget_missing_file": "Keine Audiodatei beim Teilen angehängt. Bitte vor dem Teilen eine Datei auswählen.",- "shareTarget_too_large": "Die geteilte Audiodatei überschreitet Speakrs Upload-Limit.",- "shareTarget_save_failed": "Speakr konnte die geteilte Audiodatei nicht speichern. Bitte direkt hochladen.",- "shareTarget_queue_failed": "Die geteilte Audiodatei wurde gespeichert, konnte aber nicht zur Transkription eingereiht werden.",- "recordingFinalizeFallback": "Server-seitiges Zusammenführen fehlgeschlagen; Upload als einzelne Datei stattdessen.",- "recordingNotResumable": "Diese Aufnahme kann nicht mehr fortgesetzt werden."+ "waitAndRetryGuidance": "Einige Minuten warten und erneut versuchen"},"eventExtraction": {"description": "Wenn aktiviert, identifiziert die KI Meetings, Termine und Fristen in Ihren Aufnahmen und erstellt herunterladbare Kalenderereignisse.",diff --git a/static/locales/en.json b/static/locales/en.jsonindex 079e6344..2df529da 100644--- a/static/locales/en.json+++ b/static/locales/en.json@@ -650,6 +650,7 @@"fileTooLargeMaxSize": "File too large. Max: {{size}} MB.","fileTooLargeMessage": "The audio file exceeds the maximum size allowed by the transcription service.","fileTooLargeTitle": "File Too Large",+ "generateSummaryFailed": "Could not start summary generation (HTTP {status}).","generic": "An error occurred","invalidAudioFormat": "Invalid Audio Format","invalidAudioFormatGuidance": "Try converting the audio to MP3 or WAV format before uploading.",@@ -672,32 +673,41 @@"rateLimitExceeded": "Rate Limit Exceeded","rateLimitExceededGuidance": "Please wait a few minutes and try reprocessing.","rateLimitExceededMessage": "Too many requests were sent to the transcription service.",+ "recordingFinalizeFallback": "Server-side stitch failed; uploading as a single file instead.",+ "recordingNotResumable": "That recording can no longer be resumed.",+ "reprocessSummaryFailed": "Could not start summary reprocessing (HTTP {status}).",+ "reprocessTranscriptionFailed": "Could not start transcription reprocessing (HTTP {status}).",+ "requestFailed": "The request failed (HTTP {status}). Please try again.",+ "resetStatusFailed": "Could not reset the recording status (HTTP {status}).",+ "responseNotJson": "The server sent an unexpected response. Please reload the page and try again.",+ "responseUnreadable": "The server response could not be read. Please try again.","serverError": "Server error ({{status}}): Response was not JSON","serverErrorStatus": "Server error ({{status}})",+ "serverErrorWithStatus": "The server reported an error (HTTP {status}). Please try again in a moment.","serviceUnavailable": "Service Unavailable","serviceUnavailableGuidance": "This is usually temporary. Please try again in a few minutes.","serviceUnavailableMessage": "The transcription service is temporarily unavailable.",+ "sessionExpiredReload": "Your session has expired. Please reload the page and try again.",+ "shareTargetGeneric": "Could not process the shared audio. Please try uploading directly.",+ "shareTarget_missing_file": "No audio file was attached to the share. Try selecting the file before sharing.",+ "shareTarget_queue_failed": "The shared audio was saved but could not be queued for transcription.",+ "shareTarget_save_failed": "Speakr could not save the shared audio. Please try uploading directly.",+ "shareTarget_too_large": "The shared audio file is larger than Speakr's upload limit.","splitAudioGuidance": "Try splitting the audio into smaller parts",+ "statusCheckFailed": "Could not check the recording status (HTTP {status}).","summaryFailed": "Summary generation failed. Please try again.","transcriptionFailed": "Transcription failed. Please try again.","tryAgainLaterGuidance": "Try again in a few minutes","unauthorized": "Unauthorized","unexpectedResponse": "Unexpected success response from server after upload.","unsupportedFormat": "Unsupported file format",+ "uploadBlockedByProxyGuidance": "Increase client_max_body_size on your reverse proxy; the upload never reached Speakr, so chunking does not apply",+ "uploadBlockedByProxyTitle": "Upload Blocked by Reverse Proxy","uploadFailed": "Upload failed. Please try again.","uploadFailedWithStatus": "Upload failed with status {{status}}","uploadTimedOut": "Upload timed out","validationError": "Validation error",- "waitAndRetryGuidance": "Wait a few minutes and try again",- "uploadBlockedByProxyTitle": "Upload Blocked by Reverse Proxy",- "uploadBlockedByProxyGuidance": "Increase client_max_body_size on your reverse proxy; the upload never reached Speakr, so chunking does not apply",- "shareTargetGeneric": "Could not process the shared audio. Please try uploading directly.",- "shareTarget_missing_file": "No audio file was attached to the share. Try selecting the file before sharing.",- "shareTarget_too_large": "The shared audio file is larger than Speakr's upload limit.",- "shareTarget_save_failed": "Speakr could not save the shared audio. Please try uploading directly.",- "shareTarget_queue_failed": "The shared audio was saved but could not be queued for transcription.",- "recordingFinalizeFallback": "Server-side stitch failed; uploading as a single file instead.",- "recordingNotResumable": "That recording can no longer be resumed."+ "waitAndRetryGuidance": "Wait a few minutes and try again"},"eventExtraction": {"description": "When enabled, the AI will identify meetings, appointments, and deadlines mentioned in your recordings and create downloadable calendar events.",diff --git a/static/locales/es.json b/static/locales/es.jsonindex 0b040b10..3283e8a3 100644--- a/static/locales/es.json+++ b/static/locales/es.json@@ -650,6 +650,7 @@"fileTooLargeMaxSize": "Archivo demasiado grande. Máx: {{size}} MB.","fileTooLargeMessage": "El archivo de audio supera el tamaño máximo permitido por el servicio de transcripción.","fileTooLargeTitle": "Archivo demasiado grande",+ "generateSummaryFailed": "No se ha podido iniciar la generación del resumen (HTTP {status}).","generic": "Se produjo un error","invalidAudioFormat": "Formato de audio no válido","invalidAudioFormatGuidance": "Pruebe a convertir el audio a formato MP3 o WAV antes de subir.",@@ -672,32 +673,41 @@"rateLimitExceeded": "Límite de velocidad superado","rateLimitExceededGuidance": "Por favor, espere unos minutos y vuelva a reprocesar.","rateLimitExceededMessage": "Se enviaron demasiadas solicitudes al servicio de transcripción.",+ "recordingFinalizeFallback": "El ensamblaje en el servidor falló; subiendo como un solo archivo en su lugar.",+ "recordingNotResumable": "Esa grabación ya no se puede reanudar.",+ "reprocessSummaryFailed": "No se ha podido iniciar el reprocesamiento del resumen (HTTP {status}).",+ "reprocessTranscriptionFailed": "No se ha podido iniciar el reprocesamiento de la transcripción (HTTP {status}).",+ "requestFailed": "La solicitud ha fallado (HTTP {status}). Inténtelo de nuevo.",+ "resetStatusFailed": "No se ha podido restablecer el estado de la grabación (HTTP {status}).",+ "responseNotJson": "El servidor ha enviado una respuesta inesperada. Recargue la página e inténtelo de nuevo.",+ "responseUnreadable": "No se ha podido leer la respuesta del servidor. Inténtelo de nuevo.","serverError": "服务器错误。请稍后重试。","serverErrorStatus": "Error del servidor ({{status}})",+ "serverErrorWithStatus": "El servidor ha informado de un error (HTTP {status}). Inténtelo de nuevo en un momento.","serviceUnavailable": "Servicio no disponible","serviceUnavailableGuidance": "Suele ser temporal. Por favor, inténtelo de nuevo en unos minutos.","serviceUnavailableMessage": "El servicio de transcripción no está disponible temporalmente.",+ "sessionExpiredReload": "Su sesión ha caducado. Recargue la página e inténtelo de nuevo.",+ "shareTargetGeneric": "No se pudo procesar el audio compartido. Por favor, súbalo directamente.",+ "shareTarget_missing_file": "No se adjuntó ningún archivo de audio al compartir. Seleccione el archivo antes de compartir.",+ "shareTarget_queue_failed": "El audio compartido se guardó pero no se pudo poner en cola para transcripción.",+ "shareTarget_save_failed": "Speakr no pudo guardar el audio compartido. Por favor, súbalo directamente.",+ "shareTarget_too_large": "El archivo de audio compartido supera el límite de subida de Speakr.","splitAudioGuidance": "Pruebe a dividir el audio en partes más pequeñas",+ "statusCheckFailed": "No se ha podido comprobar el estado de la grabación (HTTP {status}).","summaryFailed": "No se pudo generar el resumen. Inténtalo de nuevo.","transcriptionFailed": "La transcripción falló. Inténtalo de nuevo.","tryAgainLaterGuidance": "Inténtelo de nuevo en unos minutos","unauthorized": "No autorizado","unexpectedResponse": "Respuesta inesperada del servidor tras la subida.","unsupportedFormat": "Formato de archivo no admitido",+ "uploadBlockedByProxyGuidance": "Aumente client_max_body_size en su proxy inverso; la subida nunca llegó a Speakr, por lo que la fragmentación no aplica",+ "uploadBlockedByProxyTitle": "Subida bloqueada por el proxy inverso","uploadFailed": "La subida falló. Inténtalo de nuevo.","uploadFailedWithStatus": "La subida falló con el estado {{status}}","uploadTimedOut": "Se agotó el tiempo de subida","validationError": "Error de validación",- "waitAndRetryGuidance": "Espere unos minutos y vuelva a intentarlo",- "uploadBlockedByProxyTitle": "Subida bloqueada por el proxy inverso",- "uploadBlockedByProxyGuidance": "Aumente client_max_body_size en su proxy inverso; la subida nunca llegó a Speakr, por lo que la fragmentación no aplica",- "shareTargetGeneric": "No se pudo procesar el audio compartido. Por favor, súbalo directamente.",- "shareTarget_missing_file": "No se adjuntó ningún archivo de audio al compartir. Seleccione el archivo antes de compartir.",- "shareTarget_too_large": "El archivo de audio compartido supera el límite de subida de Speakr.",- "shareTarget_save_failed": "Speakr no pudo guardar el audio compartido. Por favor, súbalo directamente.",- "shareTarget_queue_failed": "El audio compartido se guardó pero no se pudo poner en cola para transcripción.",- "recordingFinalizeFallback": "El ensamblaje en el servidor falló; subiendo como un solo archivo en su lugar.",- "recordingNotResumable": "Esa grabación ya no se puede reanudar."+ "waitAndRetryGuidance": "Espere unos minutos y vuelva a intentarlo"},"eventExtraction": {"description": "Cuando está habilitado, la IA identificará reuniones, citas y plazos mencionados en tus grabaciones y creará eventos de calendario descargables.",diff --git a/static/locales/fr.json b/static/locales/fr.jsonindex d8ae2a52..ee32095b 100644--- a/static/locales/fr.json+++ b/static/locales/fr.json@@ -650,6 +650,7 @@"fileTooLargeMaxSize": "Fichier trop volumineux. Max : {{size}} Mo.","fileTooLargeMessage": "Le fichier audio dépasse la taille maximale autorisée par le service de transcription.","fileTooLargeTitle": "Fichier trop volumineux",+ "generateSummaryFailed": "La génération du résumé n'a pas pu démarrer (HTTP {status}).","generic": "Une erreur s’est produite","invalidAudioFormat": "Format audio invalide","invalidAudioFormatGuidance": "Essayez de convertir l’audio en MP3 ou WAV avant l’envoi.",@@ -672,32 +673,41 @@"rateLimitExceeded": "Limite de débit atteinte","rateLimitExceededGuidance": "Veuillez patienter quelques minutes avant de retraiter.","rateLimitExceededMessage": "Trop de requêtes ont été envoyées au service de transcription.",+ "recordingFinalizeFallback": "Assemblage côté serveur en échec ; envoi en tant que fichier unique à la place.",+ "recordingNotResumable": "Cet enregistrement ne peut plus être repris.",+ "reprocessSummaryFailed": "Le retraitement du résumé n'a pas pu démarrer (HTTP {status}).",+ "reprocessTranscriptionFailed": "Le retraitement de la transcription n'a pas pu démarrer (HTTP {status}).",+ "requestFailed": "La requête a échoué (HTTP {status}). Veuillez réessayer.",+ "resetStatusFailed": "Le statut de l'enregistrement n'a pas pu être réinitialisé (HTTP {status}).",+ "responseNotJson": "Le serveur a envoyé une réponse inattendue. Veuillez recharger la page et réessayer.",+ "responseUnreadable": "La réponse du serveur n'a pas pu être lue. Veuillez réessayer.","serverError": "服务器错误。请稍后重试。","serverErrorStatus": "Erreur serveur ({{status}})",+ "serverErrorWithStatus": "Le serveur a signalé une erreur (HTTP {status}). Veuillez réessayer dans un instant.","serviceUnavailable": "Service indisponible","serviceUnavailableGuidance": "C’est généralement temporaire. Réessayez dans quelques minutes.","serviceUnavailableMessage": "Le service de transcription est temporairement indisponible.",+ "sessionExpiredReload": "Votre session a expiré. Veuillez recharger la page et réessayer.",+ "shareTargetGeneric": "Impossible de traiter l'audio partagé. Veuillez l'envoyer directement.",+ "shareTarget_missing_file": "Aucun fichier audio n'était joint au partage. Sélectionnez le fichier avant de partager.",+ "shareTarget_queue_failed": "L'audio partagé a été enregistré mais n'a pas pu être mis en file pour transcription.",+ "shareTarget_save_failed": "Speakr n'a pas pu enregistrer l'audio partagé. Veuillez l'envoyer directement.",+ "shareTarget_too_large": "Le fichier audio partagé dépasse la limite d'envoi de Speakr.","splitAudioGuidance": "Essayez de diviser l’audio en parties plus petites",+ "statusCheckFailed": "Le statut de l'enregistrement n'a pas pu être vérifié (HTTP {status}).","summaryFailed": "La génération du résumé a échoué. Veuillez réessayer.","transcriptionFailed": "La transcription a échoué. Veuillez réessayer.","tryAgainLaterGuidance": "Réessayez dans quelques minutes","unauthorized": "Non autorisé","unexpectedResponse": "Réponse inattendue du serveur après l’envoi.","unsupportedFormat": "Format de fichier non pris en charge",+ "uploadBlockedByProxyGuidance": "Augmentez client_max_body_size sur votre reverse proxy ; l'upload n'a jamais atteint Speakr, donc le chunking ne s'applique pas",+ "uploadBlockedByProxyTitle": "Upload bloqué par le reverse proxy","uploadFailed": "L’envoi a échoué. Veuillez réessayer.","uploadFailedWithStatus": "Échec de l’envoi avec le statut {{status}}","uploadTimedOut": "Délai d’envoi dépassé","validationError": "Erreur de validation",- "waitAndRetryGuidance": "Patientez quelques minutes et réessayez",- "uploadBlockedByProxyTitle": "Upload bloqué par le reverse proxy",- "uploadBlockedByProxyGuidance": "Augmentez client_max_body_size sur votre reverse proxy ; l'upload n'a jamais atteint Speakr, donc le chunking ne s'applique pas",- "shareTargetGeneric": "Impossible de traiter l'audio partagé. Veuillez l'envoyer directement.",- "shareTarget_missing_file": "Aucun fichier audio n'était joint au partage. Sélectionnez le fichier avant de partager.",- "shareTarget_too_large": "Le fichier audio partagé dépasse la limite d'envoi de Speakr.",- "shareTarget_save_failed": "Speakr n'a pas pu enregistrer l'audio partagé. Veuillez l'envoyer directement.",- "shareTarget_queue_failed": "L'audio partagé a été enregistré mais n'a pas pu être mis en file pour transcription.",- "recordingFinalizeFallback": "Assemblage côté serveur en échec ; envoi en tant que fichier unique à la place.",- "recordingNotResumable": "Cet enregistrement ne peut plus être repris."+ "waitAndRetryGuidance": "Patientez quelques minutes et réessayez"},"eventExtraction": {"description": "Lorsqu'activé, l'IA identifiera les réunions, rendez-vous et échéances mentionnés dans vos enregistrements et créera des événements de calendrier téléchargeables.",diff --git a/static/locales/pt-BR.json b/static/locales/pt-BR.jsonindex f67ae74a..c620a337 100644--- a/static/locales/pt-BR.json+++ b/static/locales/pt-BR.json@@ -650,6 +650,7 @@"fileTooLargeMaxSize": "Arquivo muito grande. Máx: {{size}} MB.","fileTooLargeMessage": "O arquivo de áudio excede o tamanho máximo permitido pelo serviço de transcrição.","fileTooLargeTitle": "Arquivo Muito Grande",+ "generateSummaryFailed": "Não foi possível iniciar a geração do resumo (HTTP {status}).","generic": "Ocorreu um erro","invalidAudioFormat": "Formato de Áudio Inválido","invalidAudioFormatGuidance": "Tente converter o áudio para o formato MP3 ou WAV antes de enviar.",@@ -672,32 +673,41 @@"rateLimitExceeded": "Limite de Taxa Excedido","rateLimitExceededGuidance": "Aguarde alguns minutos e tente reprocessar.","rateLimitExceededMessage": "Muitas solicitações foram enviadas ao serviço de transcrição.",+ "recordingFinalizeFallback": "Junção no servidor falhou; enviando como um único arquivo no lugar.",+ "recordingNotResumable": "Essa gravação não pode mais ser retomada.",+ "reprocessSummaryFailed": "Não foi possível iniciar o reprocessamento do resumo (HTTP {status}).",+ "reprocessTranscriptionFailed": "Não foi possível iniciar o reprocessamento da transcrição (HTTP {status}).",+ "requestFailed": "A solicitação falhou (HTTP {status}). Tente novamente.",+ "resetStatusFailed": "Não foi possível redefinir o status da gravação (HTTP {status}).",+ "responseNotJson": "O servidor enviou uma resposta inesperada. Recarregue a página e tente novamente.",+ "responseUnreadable": "Não foi possível ler a resposta do servidor. Tente novamente.","serverError": "Erro do servidor ({{status}}): Resposta não era JSON","serverErrorStatus": "Erro do servidor ({{status}})",+ "serverErrorWithStatus": "O servidor relatou um erro (HTTP {status}). Tente novamente em instantes.","serviceUnavailable": "Serviço Indisponível","serviceUnavailableGuidance": "Isso geralmente é temporário. Tente novamente em alguns minutos.","serviceUnavailableMessage": "O serviço de transcrição está temporariamente indisponível.",+ "sessionExpiredReload": "Sua sessão expirou. Recarregue a página e tente novamente.",+ "shareTargetGeneric": "Não foi possível processar o áudio compartilhado. Faça o upload diretamente.",+ "shareTarget_missing_file": "Nenhum arquivo de áudio foi anexado ao compartilhar. Selecione o arquivo antes de compartilhar.",+ "shareTarget_queue_failed": "O áudio compartilhado foi salvo, mas não pôde ser enfileirado para transcrição.",+ "shareTarget_save_failed": "Speakr não conseguiu salvar o áudio compartilhado. Faça o upload diretamente.",+ "shareTarget_too_large": "O arquivo de áudio compartilhado excede o limite de upload do Speakr.","splitAudioGuidance": "Tente dividir o áudio em partes menores",+ "statusCheckFailed": "Não foi possível verificar o status da gravação (HTTP {status}).","summaryFailed": "Falha ao gerar o resumo. Tente novamente.","transcriptionFailed": "Falha na transcrição. Tente novamente.","tryAgainLaterGuidance": "Tente novamente em alguns minutos","unauthorized": "Não autorizado","unexpectedResponse": "Resposta de sucesso inesperada do servidor após o envio.","unsupportedFormat": "Formato de arquivo não suportado",+ "uploadBlockedByProxyGuidance": "Aumente o client_max_body_size no seu proxy reverso; o upload nunca chegou ao Speakr, então o chunking não se aplica",+ "uploadBlockedByProxyTitle": "Upload bloqueado pelo proxy reverso","uploadFailed": "Falha no envio. Tente novamente.","uploadFailedWithStatus": "Falha no envio com status {{status}}","uploadTimedOut": "Tempo limite de envio excedido","validationError": "Erro de validação",- "waitAndRetryGuidance": "Aguarde alguns minutos e tente novamente",- "uploadBlockedByProxyTitle": "Upload bloqueado pelo proxy reverso",- "uploadBlockedByProxyGuidance": "Aumente o client_max_body_size no seu proxy reverso; o upload nunca chegou ao Speakr, então o chunking não se aplica",- "shareTargetGeneric": "Não foi possível processar o áudio compartilhado. Faça o upload diretamente.",- "shareTarget_missing_file": "Nenhum arquivo de áudio foi anexado ao compartilhar. Selecione o arquivo antes de compartilhar.",- "shareTarget_too_large": "O arquivo de áudio compartilhado excede o limite de upload do Speakr.",- "shareTarget_save_failed": "Speakr não conseguiu salvar o áudio compartilhado. Faça o upload diretamente.",- "shareTarget_queue_failed": "O áudio compartilhado foi salvo, mas não pôde ser enfileirado para transcrição.",- "recordingFinalizeFallback": "Junção no servidor falhou; enviando como um único arquivo no lugar.",- "recordingNotResumable": "Essa gravação não pode mais ser retomada."+ "waitAndRetryGuidance": "Aguarde alguns minutos e tente novamente"},"eventExtraction": {"description": "Quando ativado, a IA identificará reuniões, compromissos e prazos mencionados em suas gravações e criará eventos de calendário para inserir na agenda.",diff --git a/static/locales/ru.json b/static/locales/ru.jsonindex 0f15e986..1a6bb055 100644--- a/static/locales/ru.json+++ b/static/locales/ru.json@@ -650,6 +650,7 @@"fileTooLargeMaxSize": "Файл слишком большой. Макс: {{size}} МБ.","fileTooLargeMessage": "Размер аудиофайла превышает максимально допустимый сервисом транскрипции.","fileTooLargeTitle": "Файл слишком большой",+ "generateSummaryFailed": "Не удалось запустить создание сводки (HTTP {status}).","generic": "Произошла ошибка","invalidAudioFormat": "Неверный аудиоформат","invalidAudioFormatGuidance": "Попробуйте преобразовать аудио в MP3 или WAV перед загрузкой.",@@ -672,32 +673,41 @@"rateLimitExceeded": "Превышен лимит частоты","rateLimitExceededGuidance": "Подождите несколько минут и повторите обработку.","rateLimitExceededMessage": "Сервису транскрипции отправлено слишком много запросов.",+ "recordingFinalizeFallback": "Серверная сборка не удалась; загружаю как один файл вместо этого.",+ "recordingNotResumable": "Эту запись больше нельзя возобновить.",+ "reprocessSummaryFailed": "Не удалось запустить повторное создание сводки (HTTP {status}).",+ "reprocessTranscriptionFailed": "Не удалось запустить повторную расшифровку (HTTP {status}).",+ "requestFailed": "Запрос не выполнен (HTTP {status}). Попробуйте ещё раз.",+ "resetStatusFailed": "Не удалось сбросить статус записи (HTTP {status}).",+ "responseNotJson": "Сервер вернул неожиданный ответ. Обновите страницу и попробуйте ещё раз.",+ "responseUnreadable": "Не удалось прочитать ответ сервера. Попробуйте ещё раз.","serverError": "Ошибка сервера. Пожалуйста, попробуйте позже.","serverErrorStatus": "Ошибка сервера ({{status}})",+ "serverErrorWithStatus": "Сервер сообщил об ошибке (HTTP {status}). Повторите попытку чуть позже.","serviceUnavailable": "Сервис недоступен","serviceUnavailableGuidance": "Обычно это временно. Повторите попытку через несколько минут.","serviceUnavailableMessage": "Сервис транскрипции временно недоступен.",+ "sessionExpiredReload": "Сеанс истёк. Обновите страницу и попробуйте ещё раз.",+ "shareTargetGeneric": "Не удалось обработать переданное аудио. Пожалуйста, загрузите его напрямую.",+ "shareTarget_missing_file": "К общему доступу не прикреплён аудиофайл. Выберите файл перед тем, как делиться.",+ "shareTarget_queue_failed": "Переданное аудио сохранено, но не удалось поставить его в очередь на транскрипцию.",+ "shareTarget_save_failed": "Speakr не смог сохранить переданное аудио. Пожалуйста, загрузите его напрямую.",+ "shareTarget_too_large": "Переданный аудиофайл превышает лимит загрузки Speakr.","splitAudioGuidance": "Попробуйте разделить аудио на части поменьше",+ "statusCheckFailed": "Не удалось проверить статус записи (HTTP {status}).","summaryFailed": "Не удалось сгенерировать резюме. Повторите попытку.","transcriptionFailed": "Транскрибация не удалась. Повторите попытку.","tryAgainLaterGuidance": "Повторите попытку через несколько минут","unauthorized": "Не авторизовано","unexpectedResponse": "Неожиданный ответ сервера после загрузки.","unsupportedFormat": "Неподдерживаемый формат файла",+ "uploadBlockedByProxyGuidance": "Увеличьте client_max_body_size на обратном прокси; загрузка не дошла до Speakr, поэтому разбиение на части не поможет",+ "uploadBlockedByProxyTitle": "Загрузка заблокирована обратным прокси","uploadFailed": "Не удалось загрузить. Повторите попытку.","uploadFailedWithStatus": "Загрузка не удалась со статусом {{status}}","uploadTimedOut": "Истекло время загрузки","validationError": "Ошибка проверки",- "waitAndRetryGuidance": "Подождите несколько минут и повторите",- "uploadBlockedByProxyTitle": "Загрузка заблокирована обратным прокси",- "uploadBlockedByProxyGuidance": "Увеличьте client_max_body_size на обратном прокси; загрузка не дошла до Speakr, поэтому разбиение на части не поможет",- "shareTargetGeneric": "Не удалось обработать переданное аудио. Пожалуйста, загрузите его напрямую.",- "shareTarget_missing_file": "К общему доступу не прикреплён аудиофайл. Выберите файл перед тем, как делиться.",- "shareTarget_too_large": "Переданный аудиофайл превышает лимит загрузки Speakr.",- "shareTarget_save_failed": "Speakr не смог сохранить переданное аудио. Пожалуйста, загрузите его напрямую.",- "shareTarget_queue_failed": "Переданное аудио сохранено, но не удалось поставить его в очередь на транскрипцию.",- "recordingFinalizeFallback": "Серверная сборка не удалась; загружаю как один файл вместо этого.",- "recordingNotResumable": "Эту запись больше нельзя возобновить."+ "waitAndRetryGuidance": "Подождите несколько минут и повторите"},"eventExtraction": {"description": "При включении ИИ будет определять встречи, назначения и дедлайны, упомянутые в ваших записях, и создавать загружаемые календарные события.",diff --git a/static/locales/zh.json b/static/locales/zh.jsonindex 986f5c80..cf0edcc8 100644--- a/static/locales/zh.json+++ b/static/locales/zh.json@@ -650,6 +650,7 @@"fileTooLargeMaxSize": "文件过大。上限:{{size}} MB。","fileTooLargeMessage": "音频文件超过了转录服务允许的最大大小。","fileTooLargeTitle": "文件过大",+ "generateSummaryFailed": "无法开始生成摘要(HTTP {status})。","generic": "发生错误","invalidAudioFormat": "音频格式无效","invalidAudioFormatGuidance": "请尝试将音频转换为 MP3 或 WAV 后再上传。",@@ -672,32 +673,41 @@"rateLimitExceeded": "已超过速率限制","rateLimitExceededGuidance": "请等待几分钟后再重新处理。","rateLimitExceededMessage": "向转录服务发送的请求过多。",+ "recordingFinalizeFallback": "服务端拼接失败,改为作为单个文件上传。",+ "recordingNotResumable": "该录音无法再继续。",+ "reprocessSummaryFailed": "无法开始重新生成摘要(HTTP {status})。",+ "reprocessTranscriptionFailed": "无法开始重新转录(HTTP {status})。",+ "requestFailed": "请求失败(HTTP {status})。请重试。",+ "resetStatusFailed": "无法重置录音状态(HTTP {status})。",+ "responseNotJson": "服务器返回了意外的响应。请刷新页面后重试。",+ "responseUnreadable": "无法读取服务器响应。请重试。","serverError": "服务器错误。请稍后重试。","serverErrorStatus": "服务器错误({{status}})",+ "serverErrorWithStatus": "服务器报告了一个错误(HTTP {status})。请稍后重试。","serviceUnavailable": "服务不可用","serviceUnavailableGuidance": "通常是临时问题。请几分钟后再试。","serviceUnavailableMessage": "转录服务暂时不可用。",+ "sessionExpiredReload": "您的会话已过期。请刷新页面后重试。",+ "shareTargetGeneric": "无法处理共享的音频。请改为直接上传。",+ "shareTarget_missing_file": "共享时未附加音频文件。请在共享前先选择文件。",+ "shareTarget_queue_failed": "共享的音频已保存,但无法加入转录队列。",+ "shareTarget_save_failed": "Speakr 无法保存共享的音频。请改为直接上传。",+ "shareTarget_too_large": "共享的音频文件超过 Speakr 的上传限制。","splitAudioGuidance": "请尝试将音频拆分为更小的部分",+ "statusCheckFailed": "无法检查录音状态(HTTP {status})。","summaryFailed": "摘要生成失败。请重试。","transcriptionFailed": "转录失败。请重试。","tryAgainLaterGuidance": "请几分钟后再试","unauthorized": "未授权","unexpectedResponse": "上传后服务器返回了意外响应。","unsupportedFormat": "不支持的文件格式",+ "uploadBlockedByProxyGuidance": "请增加反向代理的 client_max_body_size;上传未到达 Speakr,因此分块上传在此处无效",+ "uploadBlockedByProxyTitle": "反向代理阻止了上传","uploadFailed": "上传失败。请重试。","uploadFailedWithStatus": "上传失败,状态:{{status}}","uploadTimedOut": "上传超时","validationError": "验证错误",- "waitAndRetryGuidance": "请等待几分钟后再重试",- "uploadBlockedByProxyTitle": "反向代理阻止了上传",- "uploadBlockedByProxyGuidance": "请增加反向代理的 client_max_body_size;上传未到达 Speakr,因此分块上传在此处无效",- "shareTargetGeneric": "无法处理共享的音频。请改为直接上传。",- "shareTarget_missing_file": "共享时未附加音频文件。请在共享前先选择文件。",- "shareTarget_too_large": "共享的音频文件超过 Speakr 的上传限制。",- "shareTarget_save_failed": "Speakr 无法保存共享的音频。请改为直接上传。",- "shareTarget_queue_failed": "共享的音频已保存,但无法加入转录队列。",- "recordingFinalizeFallback": "服务端拼接失败,改为作为单个文件上传。",- "recordingNotResumable": "该录音无法再继续。"+ "waitAndRetryGuidance": "请等待几分钟后再重试"},"eventExtraction": {"description": "启用后,AI将识别录音中提到的会议、约会和截止日期,并创建可下载的日历事件。",