Skip to content

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

Python

readme updates

Murtaza Nasir183f89cd59db
diff --git a/.env.example b/.env.example
index f7971fea..fbf8b41f 100644
--- a/.env.example
+++ b/.env.example
@@ -1,21 +1,20 @@
-# Transcription/Chat Model API Configuration
-TEXT_MODEL_API_KEY=your_TEXT_MODEL_API_KEY_here
+# .env
+
TEXT_MODEL_BASE_URL=https://openrouter.ai/api/v1
+TEXT_MODEL_API_KEY=your_text_model_api_key_here
# Choose a model compatible with function calling / JSON mode on OpenRouter
-# Example: "openai/gpt-4o-mini" or "google/gemma-3-27b-it" are recommended (check OpenRouter docs for compatible models)
+# Example: "openai/gpt-4o-mini" or "google/gemma-3-27b-it" are good if using openrouter
TEXT_MODEL_NAME="openai/gpt-4o-mini"
-# OpenAI API Configuration (for transcription)
-TRANSCRIPTION_API_KEY=your_openai_api_key_here
-TRANSCRIPTION_BASE_URL=http://your_local_api_url:port/v1/
-
# Whisper Model Configuration
-# Default: "Systran/faster-distil-whisper-large-v3"
+TRANSCRIPTION_BASE_URL=http://your_local_api_url:port/v1/
+TRANSCRIPTION_API_KEY=your_transcription_api_key_here
WHISPER_MODEL="Systran/faster-distil-whisper-large-v3"
# Application Settings
# Set to "false" to disable new account registration
-ALLOW_REGISTRATION="true"
+ALLOW_REGISTRATION="false"
-# Security
-SECRET_KEY=your_secret_key_here
+# Models
+# openai/gpt-4o-mini
+# google/gemma-3-27b-it
diff --git a/app.py b/app.py
index e08387e5..55b0c5bb 100644
--- a/app.py
+++ b/app.py
@@ -212,6 +212,7 @@ transcription_api_key = os.environ.get("TRANSCRIPTION_API_KEY", "cant-be-empty")
transcription_base_url = os.environ.get("TRANSCRIPTION_BASE_URL", "https://openrouter.ai/api/v1")
app.logger.info(f"Using OpenRouter model for summaries: {TEXT_MODEL_NAME}")
+app.logger.info(f"Using Whisper API at: {transcription_base_url}")
# --- Background Transcription & Summarization Task ---
def transcribe_audio_task(app_context, recording_id, filepath, original_filename):
diff --git a/docker-compose.yml b/docker-compose.yml
index 7d7352aa..693a9558 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -9,17 +9,17 @@ services:
ports:
- "8899:8899"
volumes:
- - speakr-uploads:/data/uploads
- - speakr-instance:/data/instance
+ - /home/murtaza/whispertranscribe/uploads:/data/uploads
+ - /home/murtaza/whispertranscribe/instance:/data/instance
env_file:
- .env
environment:
- SQLALCHEMY_DATABASE_URI=sqlite:////data/instance/transcriptions.db
- UPLOAD_FOLDER=/data/uploads
# Admin user creation
- #- ADMIN_USERNAME=admin
- #- ADMIN_PASSWORD=securepassword
+ - ADMIN_USERNAME=murtaza
+ - ADMIN_PASSWORD=ukX8!jHKAR^XJN
volumes:
speakr-uploads:
diff --git a/readme.md b/readme.md
index c706447d..9f4d7ddf 100644
--- a/readme.md
+++ b/readme.md
@@ -82,7 +82,7 @@ The easiest way to deploy Speakr is using Docker and Docker Compose.
3. **Build and Start the Container:**
```bash
- docker-compose up -d
+ docker compose up -d
```
4. **Create an Admin User:**
@@ -196,7 +196,7 @@ Follow these steps to run Speakr on your local machine for development or testin
# --- Required for Summaries/Chat ---
# (Use OpenRouter or another OpenAI-compatible Chat API)
TEXT_MODEL_API_KEY=sk-or-v1-... # Your OpenRouter or compatible API key
- TEXT_MODEL_BASE_URL="https://openrouter.ai/api/v1" # Or your chat model endpoint
+ TRANSCRIPTION_BASE_URL="https://openrouter.ai/api/v1" # Or your chat model endpoint
# Recommended Models: openai/gpt-4o-mini, google/gemini-flash-1.5, etc.
TEXT_MODEL_MODEL_NAME="openai/gpt-4o-mini"
@@ -287,11 +287,11 @@ Configuration is primarily handled through the `.env` file in the project root (
**Key Variables:**
+* `TEXT_MODEL_BASE_URL`: **Required.** The base URL for the chat/summarization API. Defaults to OpenRouter's URL.
* `TEXT_MODEL_API_KEY`: **Required.** Your API key for the chat/summarization model endpoint (e.g., OpenRouter API Key).
-* `TEXT_MODEL_BASE_URL`: *Optional.* The base URL for the chat/summarization API. Defaults to OpenRouter's URL.
-* `TEXT_MODEL_MODEL_NAME`: *Optional.* The specific model to use for chat/summarization (e.g., `openai/gpt-4o-mini`, `google/gemini-flash-1.5`). Defaults to `openai/gpt-4o-mini` if not set (update from code default).
-* `TRANSCRIPTION_API_KEY`: **Required.** Your API key for the transcription endpoint. For local endpoints, this might be a specific string like "none" or "NA". Check your endpoint's documentation.
+* `TEXT_MODEL_NAME`: **Required.** The specific model to use for chat/summarization. **Important:** Choose a model that supports structured outputs for optimal performance. OpenAI models (GPT-4o and later) and Fireworks models are recommended. See [OpenRouter's structured outputs documentation](https://openrouter.ai/docs/features/structured-outputs) for more details.
* `TRANSCRIPTION_BASE_URL`: **Required.** The base URL for your transcription API endpoint (e.g., `http://localhost:8787/v1/`).
+* `TRANSCRIPTION_API_KEY`: **Required.** Your API key for the transcription endpoint. For local endpoints, this might be a specific string like "none" or "NA". Check your endpoint's documentation.
* `WHISPER_MODEL`: *Optional.* The specific model name your transcription endpoint uses/expects (e.g., `Systran/faster-distil-whisper-large-v3`). Check your endpoint's requirements.
* `SECRET_KEY`: **Required.** A long, random string used by Flask for session security. The `setup.sh` script generates one if it's missing.
* `ALLOW_REGISTRATION`: *Optional.* Set to `false` to prevent new users from registering via the web UI. Defaults to `true`.
diff --git a/static/css/styles.css b/static/css/styles.css
index 74021224..394910ff 100644
--- a/static/css/styles.css
+++ b/static/css/styles.css
@@ -603,7 +603,7 @@ div[v-if="!editingNotes"] {
display: flex;
flex-direction: column;
overflow: hidden; /* Hide overflow at container level */
- height: calc(100vh - 12rem); /* Fixed height for sidebar, adjusted for header/footer */
+ /* height: calc(100vh - 12rem); Fixed height for sidebar, adjusted for header/footer */
position: sticky;
top: 1rem; /* Stick to the top with some padding */
}