Skip to content

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

Python

Phase C: hours-based recording ceiling, resume-on-reload, admin-guide docs (#287 c/d)

Murtaza Nasir2ad0cecc59ff
diff --git a/docs/admin-guide/recording-sessions.md b/docs/admin-guide/recording-sessions.md
new file mode 100644
index 00000000..27e9cf4e
--- /dev/null
+++ b/docs/admin-guide/recording-sessions.md
@@ -0,0 +1,154 @@
+# Server-side recording sessions
+
+Server-side recording sessions let the in-browser recorder stream audio
+chunks to Speakr as they are produced, rather than buffering the entire
+recording in browser RAM and uploading it at Stop. This unlocks longer
+recordings, makes crash recovery reliable, and removes the legacy
+client-side size cap.
+
+Off by default; opt in with `ENABLE_SERVER_RECORDING_CHUNKS=true`.
+
+## What changes when it is on
+
+| Aspect | Off (legacy) | On (server sessions) |
+|---|---|---|
+| Where audio lives during recording | Browser RAM + IndexedDB | Server disk (`UPLOAD_FOLDER/_sessions/<id>/`) |
+| Max recording size | `MAX_RECORDING_MB` hard auto-stop (default 200 MB) | Soft warning at the same threshold; hours-based ceiling instead (`RECORDING_MAX_HOURS`, default 8h) |
+| Crash recovery | IndexedDB chunks survive tab refresh | Server-side chunks survive tab/browser/device crash |
+| Finalize | Single-shot `POST /upload` | `POST /upload/session/{id}/finalize`; backend ffmpeg concat demux stitches chunks |
+| Reverse-proxy chunk POSTs | One big upload (subject to body-size + read-timeout) | Many small POSTs per recording, plus a longer finalize call |
+
+## Configuration
+
+Environment variables, all optional:
+
+| Var | Default | Purpose |
+|---|---|---|
+| `ENABLE_SERVER_RECORDING_CHUNKS` | `false` | Master switch. Off keeps the legacy single-shot path. |
+| `RECORDING_SESSION_TTL_HOURS` | `24` | Sessions whose `last_seen_at` is older than this are reaped. |
+| `RECORDING_SESSION_MAX_BYTES_PER_USER` | `5368709120` (5 GB) | Per-user cap on in-progress (non-finalized) sessions. |
+| `RECORDING_SESSION_MAX_CHUNK_BYTES` | `16777216` (16 MB) | Per-chunk upload cap. Generous; MediaRecorder chunks are typically <1 MB. |
+| `RECORDING_SESSION_ALLOWED_MIME_TYPES` | `audio/webm,audio/ogg,audio/mp4,audio/mpeg,audio/wav,audio/x-m4a` | Comma-separated whitelist. |
+| `RECORDING_SESSION_CLEANUP_INTERVAL_SECONDS` | `3600` | How often the background thread sweeps expired sessions. Set to `0` to disable. |
+| `RECORDING_MAX_HOURS` | `8` | Absolute ceiling on a single recording. Stops the recorder automatically at this duration regardless of size. |
+
+## Reverse-proxy requirements
+
+The chunk-streaming flow exchanges many small POST requests during the
+recording, plus one longer finalize call. Configure your reverse proxy
+so neither is killed in flight.
+
+### nginx / Nginx Proxy Manager
+
+```nginx
+location /upload/session/ {
+ # Chunk POSTs are small; keep timeouts modest.
+ proxy_pass http://speakr_upstream;
+ proxy_set_header Host $host;
+ proxy_set_header X-Real-IP $remote_addr;
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
+ proxy_set_header X-Forwarded-Proto $scheme;
+ client_max_body_size 32m;
+ proxy_read_timeout 30s;
+}
+
+location ~* ^/upload/session/.+/finalize$ {
+ # Finalize triggers ffmpeg concat which can take tens of seconds
+ # for long recordings. Give it room.
+ proxy_pass http://speakr_upstream;
+ proxy_set_header Host $host;
+ proxy_set_header X-Real-IP $remote_addr;
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
+ proxy_set_header X-Forwarded-Proto $scheme;
+ proxy_read_timeout 600s;
+ proxy_send_timeout 600s;
+}
+```
+
+If you do not split per-location, set a single `proxy_read_timeout 600s`
+on the parent block. The chunk POSTs are short and won't be affected by
+the larger timeout; finalize will get the headroom it needs.
+
+### Caddy
+
+```
+@finalize path_regexp ^/upload/session/[^/]+/finalize$
+handle @finalize {
+ reverse_proxy speakr:8899 {
+ transport http {
+ response_header_timeout 10m
+ }
+ }
+}
+```
+
+### Apache (mod_proxy)
+
+```apache
+ProxyTimeout 600
+LimitRequestBody 33554432
+```
+
+## How storage is laid out
+
+```
+UPLOAD_FOLDER/_sessions/
+ <uuid-1>/
+ session.json
+ chunk-000001.bin
+ chunk-000002.bin
+ ...
+ <uuid-2>/
+ ...
+```
+
+- `session.json` is a JSON copy of the database row, written defensively
+ for the case where the database is wiped but the disk survives.
+- Chunks are stored under generic `.bin` extensions; format is determined
+ by the database `mime_type` column and validated when stitching.
+- Aborted sessions are torn down synchronously when the user clicks
+ Discard. Sessions that go quiet for longer than
+ `RECORDING_SESSION_TTL_HOURS` are reaped by the background cleanup
+ thread.
+
+## Crash recovery
+
+The recording client persists a small marker in `localStorage`
+(`speakr.serverRecordingSession`) on session creation. On page reload,
+Speakr checks the marker against the server: if the session is still in
+the `recording` state with at least one chunk on disk, the user is
+prompted to finalize the in-progress recording or abort it.
+
+A full client-side resume of the open MediaRecorder is not possible
+because the underlying audio track does not survive a tab reload. The
+user-visible result is therefore: prompt → finalize the chunks already
+on the server, or discard them.
+
+## Operational health
+
+- **Disk usage**: monitor `UPLOAD_FOLDER/_sessions/` size. Long-running
+ cleanup gaps or stuck `recording` rows can let it grow. The cleanup
+ thread logs a summary line on every sweep that reaps at least one
+ session.
+- **ffmpeg availability**: the stitch worker shells out to `ffmpeg`. If
+ the binary is missing, finalize fails with a clear "ffmpeg binary not
+ found on server PATH" error on the affected recording. Docker images
+ ship ffmpeg by default; bare-metal installs need to ensure it is on
+ PATH for the Speakr user.
+- **Per-user quota**: when `_user_bytes_in_progress` >= the configured
+ cap, the API returns 507 on `POST /upload/session` and on chunk
+ uploads that would exceed the cap. Surfaced to the user as a quota
+ banner.
+
+## API
+
+| Method | Path | Purpose |
+|---|---|---|
+| POST | `/upload/session` | Create a new session. Body: `{mime_type}`. |
+| POST | `/upload/session/{id}/chunks/{N}` | Append chunk N (must be `chunk_count + 1`). Body is raw bytes. |
+| GET | `/upload/session/{id}` | Status of an existing session. |
+| POST | `/upload/session/{id}/finalize` | Request asynchronous stitch + transcribe kickoff. |
+| DELETE | `/upload/session/{id}` | Abort and remove the on-disk chunks. |
+
+All endpoints require an authenticated session. The CSRF token from the
+page meta tag is sent with every request.
diff --git a/mkdocs.yml b/mkdocs.yml
index 4499d982..cad8239d 100644
--- a/mkdocs.yml
+++ b/mkdocs.yml
@@ -177,6 +177,7 @@ nav:
- System Settings: admin-guide/system-settings.md
- Default Prompts: admin-guide/prompts.md
- Vector Store: admin-guide/vector-store.md
+ - Recording Sessions: admin-guide/recording-sessions.md
- Migration Guide: admin-guide/migration-guide.md
- Troubleshooting: troubleshooting.md
diff --git a/src/api/recordings.py b/src/api/recordings.py
index 7d9dac29..5bd81faf 100644
--- a/src/api/recordings.py
+++ b/src/api/recordings.py
@@ -1376,6 +1376,15 @@ def index():
'ENABLE_SERVER_RECORDING_CHUNKS', 'false'
).lower() == 'true'
+ # Absolute hours ceiling on in-app recordings (Phase C of #287 c/d).
+ # Replaces the legacy hard-stop-on-size behaviour for users with
+ # server-side streaming enabled; size-based stop still applies as a
+ # fallback when streaming is off.
+ try:
+ recording_max_hours = float(os.environ.get('RECORDING_MAX_HOURS', '8'))
+ except (TypeError, ValueError):
+ recording_max_hours = 8.0
+
return render_template('index.html',
use_asr_endpoint=USE_ASR_ENDPOINT, # Backwards compat
connector_supports_diarization=connector_supports_diarization,
@@ -1387,7 +1396,8 @@ def index():
enable_internal_sharing=ENABLE_INTERNAL_SHARING,
user_language=user_language,
is_team_admin=is_team_admin,
- server_recording_chunks_enabled=server_recording_chunks_enabled)
+ server_recording_chunks_enabled=server_recording_chunks_enabled,
+ recording_max_hours=recording_max_hours)
diff --git a/static/js/app.modular.js b/static/js/app.modular.js
index f2b62f89..4f6f9f5a 100644
--- a/static/js/app.modular.js
+++ b/static/js/app.modular.js
@@ -2428,6 +2428,45 @@ document.addEventListener('DOMContentLoaded', async () => {
console.error('[App] Failed to check for recoverable recording:', error);
}
+ // Phase C of #287 (c)(d): also check for an in-progress
+ // server-side recording session. If localStorage remembers
+ // a session id and the server confirms it is still in the
+ // 'recording' state, surface a toast offering to abort it
+ // (the streaming client cannot resume a MediaRecorder mid-
+ // stream because the captured audio track does not survive
+ // page reload). For now we let the user confirm an abort
+ // to clean up the server-side chunks; full resume lands in
+ // a follow-up with a chunked-playback fallback.
+ try {
+ const ServerSessions = await import('./modules/db/server-recording-sessions.js');
+ const remembered = ServerSessions.getRememberedSession();
+ if (remembered && remembered.session_id) {
+ const status = await ServerSessions.getSessionStatus(remembered.session_id);
+ if (status && status.status === 'recording' && status.chunk_count > 0) {
+ const msg = t('toasts.recordingResumeFound') || 'An in-progress recording from this browser was detected on the server.';
+ const confirmFinalize = window.confirm(msg);
+ if (confirmFinalize) {
+ // Finalize using the remembered session; the
+ // server stitches what was already uploaded.
+ try {
+ await ServerSessions.finalizeSession(remembered.session_id, {
+ title: `Recovered recording ${new Date().toLocaleString()}`,
+ });
+ showToast(t('toasts.recordingFinalized') || 'Recording uploaded for processing', 'fa-cloud-upload-alt');
+ await recordingsComposable.loadRecordings();
+ } catch (e) {
+ console.warn('[App] Could not finalize recovered server session:', e);
+ setGlobalError(`Could not recover the session: ${e.message}`);
+ }
+ } else {
+ try { await ServerSessions.abortSession(remembered.session_id); } catch (_) { /* ignore */ }
+ }
+ }
+ }
+ } catch (error) {
+ console.warn('[App] Server-session resume check failed:', error);
+ }
+
// Load initial data
await Promise.all([
recordingsComposable.loadRecordings(),
diff --git a/static/js/modules/composables/audio.js b/static/js/modules/composables/audio.js
index 40929dad..58d16ab4 100644
--- a/static/js/modules/composables/audio.js
+++ b/static/js/modules/composables/audio.js
@@ -481,9 +481,26 @@ export function useAudio(state, utils) {
// Switch to recording view immediately so pending wake-lock/notification awaits don't block Safari rendering
currentView.value = 'recording';
- // Start timer
+ // Start timer. Phase C of #287 (c)(d): hours-based hard ceiling
+ // replaces the size-based auto-stop for server-streamed
+ // recordings. Reads the cap from the page-level dataset
+ // attribute so admins can tune it via env var; defaults to 8h
+ // to backstop runaway recordings while allowing genuine
+ // long-form meetings/lectures.
+ const appEl = document.getElementById('app');
+ const maxHoursAttr = appEl?.dataset?.recordingMaxHours;
+ const recordingMaxSeconds = Math.max(60, parseFloat(maxHoursAttr || '8') * 3600);
recordingInterval.value = setInterval(() => {
recordingTime.value++;
+ if (recordingTime.value >= recordingMaxSeconds) {
+ stopRecording();
+ showToast(
+ (utils.t && utils.t('toasts.recordingMaxDurationReached'))
+ || `Recording reached the maximum duration (${(recordingMaxSeconds / 3600).toFixed(1)}h) and was stopped automatically.`,
+ 'fa-stop-circle',
+ 7000
+ );
+ }
}, 1000);
// Start size monitoring
@@ -930,20 +947,36 @@ export function useAudio(state, utils) {
actualBitrate.value = (totalSize * 8) / recordingTime.value;
}
- // Check for size warning
+ // Phase C of #287 (c)(d): the 200 MB cap used to be a hard auto-stop
+ // because the entire blob was held in browser RAM and would crash
+ // the tab past a certain size. When server-side chunk streaming is
+ // active that constraint goes away — chunks flush to the server as
+ // they are produced. We still surface a soft warning at the same
+ // threshold so users know they are recording a large file, but the
+ // hard auto-stop is replaced by an absolute hours-based ceiling
+ // (`RECORDING_MAX_HOURS`, default 8) so a runaway recording from a
+ // misclick still has a backstop.
const sizeMB = totalSize / (1024 * 1024);
const warningThresholdMB = maxRecordingMB.value * 0.8;
if (sizeMB > warningThresholdMB && !fileSizeWarningShown.value) {
fileSizeWarningShown.value = true;
showToast(
- `Recording size is ${formatFileSize(totalSize)}. Consider stopping soon.`,
+ (utils.t && utils.t('toasts.recordingSizeSoftWarning', { size: formatFileSize(totalSize) }))
+ || `Recording is ${formatFileSize(totalSize)}. Consider stopping when convenient.`,
'fa-exclamation-triangle',
5000
);
}
- // Auto-stop if max size reached
+ // Server-streaming path: no client-side hard size cap. The absolute
+ // ceiling is hours-based and lives in the recording-time tick below.
+ if (serverSessionUploader) {
+ return;
+ }
+
+ // Legacy single-shot path: keep the hard auto-stop at the configured
+ // size so the in-memory blob does not run the tab out of RAM.
if (sizeMB > maxRecordingMB.value) {
stopRecording();
showToast(
diff --git a/static/locales/de.json b/static/locales/de.json
index cc2fb8e8..c1249da6 100644
--- a/static/locales/de.json
+++ b/static/locales/de.json
@@ -640,7 +640,8 @@
"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."
+ "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."
},
"eventExtraction": {
"description": "Wenn aktiviert, identifiziert die KI Meetings, Termine und Fristen in Ihren Aufnahmen und erstellt herunterladbare Kalenderereignisse.",
@@ -1583,6 +1584,10 @@
"toasts": {
"uploadFailedDownloadedLocally": "Upload fehlgeschlagen. Audio wurde im Downloads-Ordner für einen späteren Versuch gespeichert.",
"uploadFailedNoRecovery": "Upload fehlgeschlagen und Audio konnte nicht lokal gespeichert werden. Bitte erneut aufnehmen.",
- "shareTargetReceived": "Geteilte Audiodatei empfangen und zur Transkription eingereiht"
+ "shareTargetReceived": "Geteilte Audiodatei empfangen und zur Transkription eingereiht",
+ "recordingSizeSoftWarning": "Aufnahme ist {{size}}. Erwägen Sie, sie bei Gelegenheit zu stoppen.",
+ "recordingMaxDurationReached": "Aufnahme hat die Höchstdauer erreicht und wurde automatisch gestoppt.",
+ "recordingFinalized": "Aufnahme zur Verarbeitung hochgeladen",
+ "recordingResumeFound": "Eine laufende Aufnahme aus diesem Browser wurde auf dem Server gefunden. Fortsetzen?"
}
}
diff --git a/static/locales/en.json b/static/locales/en.json
index 9812dc01..4009be32 100644
--- a/static/locales/en.json
+++ b/static/locales/en.json
@@ -640,7 +640,8 @@
"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."
+ "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."
},
"eventExtraction": {
"description": "When enabled, the AI will identify meetings, appointments, and deadlines mentioned in your recordings and create downloadable calendar events.",
@@ -1583,6 +1584,10 @@
"toasts": {
"uploadFailedDownloadedLocally": "Upload failed. Audio saved to your Downloads folder for later retry.",
"uploadFailedNoRecovery": "Upload failed and audio could not be saved locally. Please record again.",
- "shareTargetReceived": "Shared audio received and queued for transcription"
+ "shareTargetReceived": "Shared audio received and queued for transcription",
+ "recordingSizeSoftWarning": "Recording is {{size}}. Consider stopping when convenient.",
+ "recordingMaxDurationReached": "Recording reached the maximum duration and was stopped automatically.",
+ "recordingFinalized": "Recording uploaded for processing",
+ "recordingResumeFound": "An in-progress recording from this browser was detected on the server. Resume?"
}
}
diff --git a/static/locales/es.json b/static/locales/es.json
index e6d69de5..44b81f45 100644
--- a/static/locales/es.json
+++ b/static/locales/es.json
@@ -640,7 +640,8 @@
"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."
+ "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."
},
"eventExtraction": {
"description": "Cuando está habilitado, la IA identificará reuniones, citas y plazos mencionados en tus grabaciones y creará eventos de calendario descargables.",
@@ -1583,6 +1584,10 @@
"toasts": {
"uploadFailedDownloadedLocally": "Subida fallida. El audio se guardó en la carpeta de Descargas para reintentarlo más tarde.",
"uploadFailedNoRecovery": "Subida fallida y el audio no pudo guardarse localmente. Por favor, vuelva a grabar.",
- "shareTargetReceived": "Audio compartido recibido y puesto en cola para transcripción"
+ "shareTargetReceived": "Audio compartido recibido y puesto en cola para transcripción",
+ "recordingSizeSoftWarning": "La grabación ocupa {{size}}. Considere detenerla cuando le convenga.",
+ "recordingMaxDurationReached": "La grabación alcanzó la duración máxima y se detuvo automáticamente.",
+ "recordingFinalized": "Grabación subida para procesamiento",
+ "recordingResumeFound": "Se detectó una grabación en curso de este navegador en el servidor. ¿Reanudar?"
}
}
diff --git a/static/locales/fr.json b/static/locales/fr.json
index 3ae5a615..39bfe30e 100644
--- a/static/locales/fr.json
+++ b/static/locales/fr.json
@@ -640,7 +640,8 @@
"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."
+ "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."
},
"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.",
@@ -1583,6 +1584,10 @@
"toasts": {
"uploadFailedDownloadedLocally": "Échec de l'envoi. L'audio a été enregistré dans votre dossier Téléchargements pour une nouvelle tentative.",
"uploadFailedNoRecovery": "Échec de l'envoi et l'audio n'a pas pu être enregistré localement. Veuillez réenregistrer.",
- "shareTargetReceived": "Audio partagé reçu et mis en file pour transcription"
+ "shareTargetReceived": "Audio partagé reçu et mis en file pour transcription",
+ "recordingSizeSoftWarning": "L'enregistrement fait {{size}}. Pensez à l'arrêter quand vous pourrez.",
+ "recordingMaxDurationReached": "L'enregistrement a atteint la durée maximale et s'est arrêté automatiquement.",
+ "recordingFinalized": "Enregistrement envoyé pour traitement",
+ "recordingResumeFound": "Un enregistrement en cours dans ce navigateur a été détecté sur le serveur. Reprendre ?"
}
}
diff --git a/static/locales/pt-BR.json b/static/locales/pt-BR.json
index a2724e97..db70c6ea 100644
--- a/static/locales/pt-BR.json
+++ b/static/locales/pt-BR.json
@@ -640,7 +640,8 @@
"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."
+ "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."
},
"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.",
@@ -1583,6 +1584,10 @@
"toasts": {
"uploadFailedDownloadedLocally": "Upload falhou. Áudio salvo na pasta Downloads para tentar novamente mais tarde.",
"uploadFailedNoRecovery": "Upload falhou e o áudio não pôde ser salvo localmente. Por favor, grave novamente.",
- "shareTargetReceived": "Áudio compartilhado recebido e enfileirado para transcrição"
+ "shareTargetReceived": "Áudio compartilhado recebido e enfileirado para transcrição",
+ "recordingSizeSoftWarning": "A gravação tem {{size}}. Considere parar quando for conveniente.",
+ "recordingMaxDurationReached": "A gravação atingiu a duração máxima e foi parada automaticamente.",
+ "recordingFinalized": "Gravação enviada para processamento",
+ "recordingResumeFound": "Uma gravação em andamento deste navegador foi detectada no servidor. Retomar?"
}
}
diff --git a/static/locales/ru.json b/static/locales/ru.json
index a7419d44..2973e3b7 100644
--- a/static/locales/ru.json
+++ b/static/locales/ru.json
@@ -640,7 +640,8 @@
"shareTarget_missing_file": "К общему доступу не прикреплён аудиофайл. Выберите файл перед тем, как делиться.",
"shareTarget_too_large": "Переданный аудиофайл превышает лимит загрузки Speakr.",
"shareTarget_save_failed": "Speakr не смог сохранить переданное аудио. Пожалуйста, загрузите его напрямую.",
- "shareTarget_queue_failed": "Переданное аудио сохранено, но не удалось поставить его в очередь на транскрипцию."
+ "shareTarget_queue_failed": "Переданное аудио сохранено, но не удалось поставить его в очередь на транскрипцию.",
+ "recordingFinalizeFallback": "Серверная сборка не удалась; загружаю как один файл вместо этого."
},
"eventExtraction": {
"description": "При включении ИИ будет определять встречи, назначения и дедлайны, упомянутые в ваших записях, и создавать загружаемые календарные события.",
@@ -1583,6 +1584,10 @@
"toasts": {
"uploadFailedDownloadedLocally": "Загрузка не удалась. Аудио сохранено в папку «Загрузки» для повторной попытки.",
"uploadFailedNoRecovery": "Загрузка не удалась и аудио не удалось сохранить локально. Пожалуйста, запишите снова.",
- "shareTargetReceived": "Аудио получено через «Поделиться» и поставлено в очередь на транскрипцию"
+ "shareTargetReceived": "Аудио получено через «Поделиться» и поставлено в очередь на транскрипцию",
+ "recordingSizeSoftWarning": "Размер записи {{size}}. Подумайте об остановке при удобном случае.",
+ "recordingMaxDurationReached": "Запись достигла максимальной длительности и была остановлена автоматически.",
+ "recordingFinalized": "Запись отправлена на обработку",
+ "recordingResumeFound": "На сервере обнаружена незавершённая запись из этого браузера. Возобновить?"
}
}
diff --git a/static/locales/zh.json b/static/locales/zh.json
index 6f05b035..305bafb3 100644
--- a/static/locales/zh.json
+++ b/static/locales/zh.json
@@ -640,7 +640,8 @@
"shareTarget_missing_file": "共享时未附加音频文件。请在共享前先选择文件。",
"shareTarget_too_large": "共享的音频文件超过 Speakr 的上传限制。",
"shareTarget_save_failed": "Speakr 无法保存共享的音频。请改为直接上传。",
- "shareTarget_queue_failed": "共享的音频已保存,但无法加入转录队列。"
+ "shareTarget_queue_failed": "共享的音频已保存,但无法加入转录队列。",
+ "recordingFinalizeFallback": "服务端拼接失败,改为作为单个文件上传。"
},
"eventExtraction": {
"description": "启用后,AI将识别录音中提到的会议、约会和截止日期,并创建可下载的日历事件。",
@@ -1583,6 +1584,10 @@
"toasts": {
"uploadFailedDownloadedLocally": "上传失败。音频已保存到下载文件夹,可稍后重试。",
"uploadFailedNoRecovery": "上传失败,且音频未能本地保存。请重新录制。",
- "shareTargetReceived": "已接收共享音频并加入转录队列"
+ "shareTargetReceived": "已接收共享音频并加入转录队列",
+ "recordingSizeSoftWarning": "录音大小为 {{size}},可在方便时停止。",
+ "recordingMaxDurationReached": "录音已达到最长时长,已自动停止。",
+ "recordingFinalized": "录音已上传等待处理",
+ "recordingResumeFound": "在服务器上检测到此浏览器的未完成录音。是否继续?"
}
}
diff --git a/templates/index.html b/templates/index.html
index c1a02ba8..d7aee174 100644
--- a/templates/index.html
+++ b/templates/index.html
@@ -57,6 +57,7 @@
data-show-timestamps-simple-view="{{ 'True' if (current_user.is_authenticated and current_user.show_timestamps_simple_view) else 'False' }}"
data-editor-autosave="{{ 'True' if (current_user.is_authenticated and current_user.editor_autosave) else 'False' }}"
data-server-recording-chunks="{{ 'True' if server_recording_chunks_enabled else 'False' }}"
+ data-recording-max-hours="{{ recording_max_hours }}"
class="h-full flex flex-col opacity-0 transition-opacity duration-500">
<!-- Header -->