Skip to content

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

Python

Docs: suite on PostgreSQL, SSO Remember me, operationId, username length, proxy hops without a proxy, failed transcription card

Murtaza Nasirc90316ce88ca
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 541c8c81..61bcf7d8 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -135,9 +135,23 @@ python -m pytest -q tests/test_migration_compatibility.py tests/test_upgrade_pat
# and against a real PostgreSQL, which the tests skip without one
docker compose -f docker-compose.postgres.yml up -d postgres
-TEST_DATABASE_URI=postgresql://speakr:speakr@localhost:5432/speakr python -m pytest -q tests/
+TEST_DATABASE_URI=postgresql://speakr:speakr@localhost:5432/speakr python -m pytest -q \
+ tests/test_postgres_migrations.py tests/test_migration_drop_not_null.py
```
+The whole suite also runs on PostgreSQL in CI (`python-tests-postgres`). To run it locally,
+create an empty database used only by the tests and pass it in `PYTEST_DATABASE_URI`:
+
+```bash
+docker compose -f docker-compose.postgres.yml exec postgres createdb -U speakr speakr_suite
+PYTEST_DATABASE_URI=postgresql://speakr:speakr@localhost:5432/speakr_suite python -m pytest -q tests/
+```
+
+`TEST_DATABASE_URI` is read only by the migration tests, which drop every table when they
+finish, so the two variables point at different databases. PostgreSQL enforces what SQLite
+does not: test data has to fit the columns (a username holds at most 20 characters), and
+a test that cleans up deletes the rows that refer to a recording, tag or user before it.
+
These run in CI, and the pre-commit hook runs them whenever you touch `src/init_db.py`,
`src/utils/database.py` or `src/models/`.
diff --git a/docs/admin-guide/sso-setup.md b/docs/admin-guide/sso-setup.md
index c4c373e5..054eecfc 100644
--- a/docs/admin-guide/sso-setup.md
+++ b/docs/admin-guide/sso-setup.md
@@ -90,6 +90,10 @@ The claims may live in the ID token or at the UserInfo endpoint; both work. When
- If `SSO_AUTO_REGISTER=false`, only existing users with a linked SSO subject can sign in.
- Email domain allowlist is enforced only when an email is present.
+## Staying signed in
+
+A **Remember me** option is shown below the SSO button on the sign-in page. When it is ticked, the sign-in lasts `REMEMBER_COOKIE_DAYS` days (default 30); otherwise it ends when the browser is closed. Before v0.10.15, every SSO sign-in was remembered for a year.
+
## Disabling password login
Set `SSO_DISABLE_PASSWORD_LOGIN=true` to enforce SSO-only authentication for regular users. When enabled:
diff --git a/docs/admin-guide/user-management.md b/docs/admin-guide/user-management.md
index 9f172cab..08e07354 100644
--- a/docs/admin-guide/user-management.md
+++ b/docs/admin-guide/user-management.md
@@ -14,7 +14,7 @@ The search bar at the top responds instantly as you type, filtering the table to
Creating a user account starts with clicking the Add User button in the top right corner. The modal that appears asks for the essentials - username, email address, and password. You'll also decide immediately whether this person needs admin privileges, though you can always change this later.
-The username becomes their identity within Speakr, appearing in the interface and organizing their recordings. The email address serves dual purposes - it's their login credential and their contact point for any system communications. The password you set is temporary; users should change it immediately after their first login through their [account settings](../user-guide/settings.md). Configure initial [language preferences](../user-guide/settings.md#language-preferences) and [custom prompts](../user-guide/settings.md#custom-prompts-tab).
+The username becomes their identity within Speakr, appearing in the interface and organizing their recordings. It is 2 to 20 characters long. The email address serves dual purposes - it's their login credential and their contact point for any system communications. The password you set is temporary; users should change it immediately after their first login through their [account settings](../user-guide/settings.md). Configure initial [language preferences](../user-guide/settings.md#language-preferences) and [custom prompts](../user-guide/settings.md#custom-prompts-tab).
Admin privileges are powerful and should be granted sparingly. Admin users can see and modify all [system settings](system-settings.md), manage other users including other admins, configure [default prompts](prompts.md), and monitor the [vector store](vector-store.md). Most users will never need these capabilities.
diff --git a/docs/getting-started/installation.md b/docs/getting-started/installation.md
index d20cef2e..f939c80c 100644
--- a/docs/getting-started/installation.md
+++ b/docs/getting-started/installation.md
@@ -564,10 +564,15 @@ images, and connections may use.
### Reverse-proxy hops
-`TRUSTED_PROXY_HOPS` (default `1`) controls how many `X-Forwarded-For` /
-`X-Forwarded-Proto` hops are trusted for client-IP and HTTPS detection. Set it
-to the actual number of proxies in front of the app so rate limiting and HSTS
-behave correctly and forwarded headers cannot be spoofed.
+`TRUSTED_PROXY_HOPS` (default `1`) is the number of proxies in front of the app
+whose `X-Forwarded-For`, `X-Forwarded-Proto`, `X-Forwarded-Host` and
+`X-Forwarded-Prefix` headers are trusted. These headers give the client address
+(used for rate limiting), HTTPS detection and the host name. Set it to the number
+of proxies in front of Speakr.
+
+When Speakr is reachable directly, without a proxy, set `TRUSTED_PROXY_HOPS=0`
+so that these headers cannot be forged, and set `APP_BASE_URL` so that the links
+in password-reset and verification emails always use your address.
## Advanced Deployment Scenarios
diff --git a/docs/troubleshooting.md b/docs/troubleshooting.md
index e5c00763..f77e7331 100644
--- a/docs/troubleshooting.md
+++ b/docs/troubleshooting.md
@@ -52,6 +52,8 @@ When recordings stay in "pending" or "queued" status indefinitely, check these c
### Transcription Fails Immediately
+A failed transcription is shown in place of the transcript, with the cause, a hint and a **Reprocess transcription** button. **Technical details** opens the error message returned by the transcription service; when you report a problem, copy it with the button beside it.
+
Quick failures usually indicate API authentication problems. Double-check your API keys in the environment file. Remember that OpenAI and OpenRouter use different key formats. OpenAI keys start with "sk-" while OpenRouter keys look different. Ensure you're using the right key for your configured service.
API rate limits or insufficient credits also cause immediate failures. Log into your API provider's dashboard to check your usage and limits. Some API plans have restrictive rate limits that Speakr might exceed with large files.
diff --git a/docs/user-guide/api-reference.md b/docs/user-guide/api-reference.md
index c76586e8..f8133ac2 100644
--- a/docs/user-guide/api-reference.md
+++ b/docs/user-guide/api-reference.md
@@ -114,6 +114,8 @@ Lists the features this instance supports. Read features here, not from the vers
| `GET /api/v1/docs` | Interactive Swagger UI |
| `GET /api/v1/openapi.json` | OpenAPI 3.0 specification |
+Every operation in the specification has an `operationId`, which is required to add Speakr to Open WebUI as an OpenAPI tool server.
+
<div style="max-width: 90%; margin: 1.5em auto;">
<img src="../../assets/images/screenshots/api-swagger-ui.png" alt="Swagger UI Documentation" style="border-radius: 8px; box-shadow: 0 4px 12px rgba(0,0,0,0.1);">
<p style="text-align: center; margin-top: 0.5rem; font-style: italic; color: #666;">Interactive API documentation with Swagger UI at /api/v1/docs</p>