Speakr is a personal, self-hosted web application designed for transcribing audio recordings
Python
updated compose structure
Murtaza Nasirec912d3a4319
diff --git a/docker-compose.example.yml b/docker-compose.example.ymlindex c7207625..fb44d8f3 100644--- a/docker-compose.example.yml+++ b/docker-compose.example.yml@@ -1,65 +1,38 @@services:app:- image: learnedmachine/speakr:latest+ build:+ context: . # This uses your current directory as the build context+ dockerfile: Dockerfile # If your Dockerfile has a different name, specify it herecontainer_name: speakrrestart: unless-stoppedports:- "8899:8899"- # VOLUME CONFIGURATION OPTIONS:- # Uncomment ONE of the following volume configurations:- # Option 1: Using specific host paths for both volumes+ # --- Configuration ---+ # Environment variables are loaded from the .env file.+ #+ # To get started:+ # 1. Choose your desired transcription method.+ # 2. Copy the corresponding example file to .env:+ #+ # For standard Whisper API:+ # cp env.whisper.example .env+ #+ # For a custom ASR endpoint:+ # cp env.asr.example .env+ #+ # 3. Edit the .env file to add your API keys and settings.+ env_file:+ - .env++ # --- Volume Configuration ---+ # Choose ONE of the following volume configurations.+ # Option 1 (Recommended): Bind mounts to local folders.volumes:- - /path/to/uploads:/data/uploads # Replace with your custom path- - /path/to/instance:/data/instance # Replace with your custom path-- # Option 2: Using Docker-managed volumes for both- # volumes:- # - speakr-uploads:/data/uploads # Docker will manage this volume- # - speakr-instance:/data/instance # Docker will manage this volume-- # Option 3: Mixed approach - custom path for uploads, Docker-managed for instance- # volumes:- # - /path/to/uploads:/data/uploads # Replace with your custom path- # - speakr-instance:/data/instance # Docker will manage this volume-- environment:- # Database and upload folder configuration- - SQLALCHEMY_DATABASE_URI=sqlite:////data/instance/transcriptions.db- - UPLOAD_FOLDER=/data/uploads-- # Text model configuration- - TEXT_MODEL_BASE_URL=https://openrouter.ai/api/v1- - TEXT_MODEL_API_KEY=your_text_model_api_key_here- - TEXT_MODEL_NAME=openai/gpt-4o-mini-- # Whisper model configuration- - 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- # Transcription and Output languages are now per-user settings, configurable on the Account page in the app.- - ALLOW_REGISTRATION=false- - SUMMARY_MAX_TOKENS=8000 # Optional: Max tokens for title/summary generation (default: 3000)- - CHAT_MAX_TOKENS=5000 # Optional: Max tokens for chat responses (default: 2000)-- # Admin user creation- - ADMIN_USERNAME=admin- - ADMIN_PASSWORD=securepassword+ - ./uploads:/data/uploads+ - ./instance:/data/instance-# IMPORTANT: Uncomment this section if you're using any Docker-managed volumes-# (required for Options 2 and 3 above)-# volumes:-# speakr-uploads:-# # This defines the Docker-managed volume-# speakr-instance:-# # This defines the Docker-managed volume-#-# For custom volume names, use:-# volumes:-# speakr-uploads:-# name: custom-speakr-uploads-name-# speakr-instance:-# name: custom-speakr-instance-name+ # Option 2: Docker-managed volumes.+ # volumes:+ # - speakr-uploads:/data/uploads+ # - speakr-instance:/data/instance\ No newline at end of filediff --git a/docker-compose.override.yml.example b/docker-compose.override.yml.exampledeleted file mode 100644index 4f998143..00000000--- a/docker-compose.override.yml.example+++ /dev/null@@ -1,16 +0,0 @@-version: '3.8'--services:- app:- volumes:- # Uncomment and modify these lines to use custom paths for data storage- # - /path/to/your/uploads:/data/uploads- # - /path/to/your/database:/data/instance- environment:- # Admin user creation (uncomment and set these to create an admin user on first run)- # - ADMIN_USERNAME=admin- # - [email protected]- # - ADMIN_PASSWORD=securepassword-- # Application settings- # - ALLOW_REGISTRATION=falsediff --git a/env.asr.example b/env.asr.examplenew file mode 100644index 00000000..bd91af10--- /dev/null+++ b/env.asr.example@@ -0,0 +1,40 @@+# -----------------------------------------------------------------------------+# Speakr Configuration: ASR Endpoint+#+# Instructions:+# 1. Copy this file to a new file named .env+# cp env.asr.example .env+# 2. Fill in the required URLs, API keys, and settings below.+# -----------------------------------------------------------------------------++# --- Text Generation Model (for summaries, titles, etc.) ---+TEXT_MODEL_BASE_URL=https://openrouter.ai/api/v1+TEXT_MODEL_API_KEY=your_openrouter_api_key+TEXT_MODEL_NAME=openai/gpt-4o-mini++# --- Transcription Service (ASR Endpoint) ---+# This flag tells the app to use the ASR endpoint instead of a standard API+USE_ASR_ENDPOINT=true++# ASR Endpoint Details+ASR_BASE_URL=http://your_asr_host:9000+ASR_ENCODE=true+ASR_TASK=transcribe+ASR_DIARIZE=true+ASR_MIN_SPEAKERS=1+ASR_MAX_SPEAKERS=5++# --- Application Settings ---+# Set to "true" to allow user registration, "false" to disable+ALLOW_REGISTRATION=false+SUMMARY_MAX_TOKENS=8000+CHAT_MAX_TOKENS=5000++# --- Admin User (created on first run) ---+ADMIN_USERNAME=admin+ADMIN_PASSWORD=changeme++# --- Docker Settings (rarely need to be changed) ---+SQLALCHEMY_DATABASE_URI=sqlite:////data/instance/transcriptions.db+UPLOAD_FOLDER=/data/uploadsdiff --git a/env.whisper.example b/env.whisper.examplenew file mode 100644index 00000000..ab22bd33--- /dev/null+++ b/env.whisper.example@@ -0,0 +1,33 @@+# -----------------------------------------------------------------------------+# Speakr Configuration: Standard Whisper API+#+# Instructions:+# 1. Copy this file to a new file named .env+# cp env.whisper.example .env+# 2. Fill in the required API keys and settings below.+# -----------------------------------------------------------------------------++# --- Text Generation Model (for summaries, titles, etc.) ---+TEXT_MODEL_BASE_URL=https://openrouter.ai/api/v1+TEXT_MODEL_API_KEY=your_openrouter_api_key+TEXT_MODEL_NAME=openai/gpt-4o-mini++# --- Transcription Service (OpenAI Whisper API) ---+TRANSCRIPTION_BASE_URL=https://api.openai.com/v1+TRANSCRIPTION_API_KEY=your_openai_api_key+WHISPER_MODEL=whisper-1++# --- Application Settings ---+# Set to "true" to allow user registration, "false" to disable+ALLOW_REGISTRATION=false+SUMMARY_MAX_TOKENS=8000+CHAT_MAX_TOKENS=5000++# --- Admin User (created on first run) ---+ADMIN_USERNAME=admin+ADMIN_PASSWORD=changeme++# --- Docker Settings (rarely need to be changed) ---+SQLALCHEMY_DATABASE_URI=sqlite:////data/instance/transcriptions.db+UPLOAD_FOLDER=/data/uploads