Skip to content

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

Python

Add audio compression documentation to installation, admin settings, recording guide, and FAQ

Murtaza Nasir3de4cd1470ae
diff --git a/docs/admin-guide/system-settings.md b/docs/admin-guide/system-settings.md
index bee465bb..59dbb1c7 100644
--- a/docs/admin-guide/system-settings.md
+++ b/docs/admin-guide/system-settings.md
@@ -113,6 +113,22 @@ Speakr uses separate job queues for transcription and summarization to prevent s
Jobs are persisted to the database and survive application restarts. If Speakr restarts while jobs are processing, they automatically resume from where they left off.
+### Audio Compression
+
+Speakr can automatically compress lossless audio uploads (WAV, AIFF) to save storage space. This happens transparently on upload - the original file is replaced with the compressed version.
+
+**AUDIO_COMPRESS_UPLOADS**: Enable automatic compression of lossless uploads. When `true`, WAV and AIFF files are compressed on upload. Already-compressed formats (MP3, AAC, OGG, etc.) are never re-encoded. Default: `true`.
+
+**AUDIO_CODEC**: Target compression format. Options:
+
+- `mp3` - Lossy, excellent compatibility, smallest files (~90% reduction)
+- `flac` - Lossless, preserves full quality (~50-70% reduction)
+- `opus` - Modern lossy codec, efficient for speech
+
+Default: `mp3`.
+
+**AUDIO_BITRATE**: Bitrate for lossy codecs (MP3, Opus). Common values: `64k`, `128k`, `192k`. Ignored for FLAC. Default: `128k`.
+
### Configuration Example
```bash
@@ -129,6 +145,11 @@ ENABLE_AUTO_DELETION=true
DEFAULT_RETENTION_DAYS=90
DELETION_MODE=audio_only
+# Audio compression (enabled by default)
+AUDIO_COMPRESS_UPLOADS=true
+AUDIO_CODEC=mp3
+AUDIO_BITRATE=128k
+
# Processing queue
JOB_QUEUE_WORKERS=2
JOB_MAX_RETRIES=3
diff --git a/docs/faq.md b/docs/faq.md
index c03bc9a4..9d27fd4d 100644
--- a/docs/faq.md
+++ b/docs/faq.md
@@ -204,6 +204,38 @@ For Chinese transcription specifically, use the large-v3 model as smaller models
Chunking by file size (e.g., CHUNK_LIMIT=20MB) works well for consistent bitrate audio. Chunking by duration (e.g., CHUNK_LIMIT=1400s) is better when your transcription service has time limits, like Azure's 1500-second maximum. Duration-based chunking ensures no chunk exceeds the time limit regardless of file compression or quality.
+### Does Speakr compress my audio files?
+
+Yes, by default. Speakr automatically compresses lossless uploads (WAV, AIFF) to save storage space. A typical 500MB WAV file becomes roughly 50MB after compression - a 90% reduction. This happens transparently when you upload.
+
+**What gets compressed:**
+- WAV and AIFF files (uncompressed/lossless formats)
+
+**What stays unchanged:**
+- Already-compressed formats: MP3, AAC, OGG, M4A, FLAC, etc.
+- These are never re-encoded to avoid quality loss
+
+**Configuration options** (in your `.env` file):
+```bash
+AUDIO_COMPRESS_UPLOADS=true # Enable/disable (default: true)
+AUDIO_CODEC=mp3 # mp3, flac, or opus (default: mp3)
+AUDIO_BITRATE=128k # For lossy codecs (default: 128k)
+```
+
+If you need to preserve original audio quality, set `AUDIO_CODEC=flac` for lossless compression, or set `AUDIO_COMPRESS_UPLOADS=false` to disable compression entirely.
+
+### Which audio codec should I choose?
+
+The three codec options serve different needs:
+
+| Codec | Type | Size Reduction | Best For |
+|-------|------|----------------|----------|
+| **mp3** | Lossy | ~90% from WAV | General use, maximum storage savings |
+| **flac** | Lossless | ~50-70% from WAV | Archival, when quality preservation matters |
+| **opus** | Lossy | ~90% from WAV | Speech-focused recordings, modern systems |
+
+For most users, the default **mp3 at 128k** provides excellent quality for speech while maximizing storage savings. If you're archiving important recordings and want to preserve full audio fidelity, use **flac**. The **opus** codec is efficient for speech but has slightly less universal compatibility than MP3.
+
---
Return to [Home](index.md) →
\ No newline at end of file
diff --git a/docs/getting-started/installation.md b/docs/getting-started/installation.md
index 96f533be..f795123c 100644
--- a/docs/getting-started/installation.md
+++ b/docs/getting-started/installation.md
@@ -190,6 +190,35 @@ When chunking is enabled, Speakr automatically detects when a file exceeds the c
This feature only applies when using the standard Whisper API method. If you're using an ASR endpoint, chunking is not needed as these services typically handle large files natively.
+#### Audio Compression
+
+Speakr can automatically compress lossless audio uploads to save storage space. This is particularly useful when users upload large WAV or AIFF files from professional recording equipment or phone apps that record in uncompressed formats.
+
+```bash
+AUDIO_COMPRESS_UPLOADS=true
+AUDIO_CODEC=mp3
+AUDIO_BITRATE=128k
+```
+
+When enabled (the default), lossless files are automatically converted on upload:
+
+| Setting | Options | Description |
+|---------|---------|-------------|
+| `AUDIO_COMPRESS_UPLOADS` | `true`/`false` | Enable automatic compression (default: `true`) |
+| `AUDIO_CODEC` | `mp3`, `flac`, `opus` | Target format (default: `mp3`) |
+| `AUDIO_BITRATE` | e.g., `64k`, `128k`, `192k` | Bitrate for lossy codecs (default: `128k`) |
+
+**Codec options:**
+
+- **mp3** - Lossy compression, excellent compatibility, smallest files (~90% reduction from WAV)
+- **flac** - Lossless compression, preserves full audio quality (~50-70% reduction from WAV)
+- **opus** - Modern lossy codec, efficient compression, good for speech
+
+Already-compressed formats (MP3, AAC, OGG, M4A, etc.) are never re-encoded to avoid quality degradation. Only truly lossless formats (WAV, AIFF) are compressed.
+
+!!! tip "Storage Savings Example"
+ A 500MB WAV recording compressed to MP3 at 128k becomes roughly 50MB - a 90% reduction. For lossless preservation, FLAC typically achieves 50-70% reduction while maintaining perfect audio quality.
+
#### Inquire Mode for Semantic Search
Inquire Mode transforms Speakr from a simple transcription tool into a knowledge base of all your recordings. When enabled, you can search across all your transcriptions using natural language questions:
diff --git a/docs/user-guide/recording.md b/docs/user-guide/recording.md
index 67447175..2da36e31 100644
--- a/docs/user-guide/recording.md
+++ b/docs/user-guide/recording.md
@@ -20,6 +20,9 @@ The upload interface provides a simple drag-and-drop area at the top of the scre
Speakr supports a [wide range of audio and video formats](../faq.md#what-audio-formats-does-speakr-support). Common audio formats like MP3, WAV, M4A, FLAC, AAC, and OGG work perfectly. You can also upload video files including MP4, MOV, and AVI, and Speakr will extract and process the audio track. Mobile recordings in formats like AMR, 3GP, and 3GPP are also supported. The default file size limit is 500MB, though this can be configured by your administrator in [system settings](../admin-guide/system-settings.md#maximum-file-size). For files over 25MB with OpenAI, see [chunking configuration](../troubleshooting.md#files-over-25mb-fail-with-openai).
+!!! info "Automatic Audio Compression"
+ Speakr automatically compresses lossless uploads (WAV, AIFF) to save storage space. A 500MB WAV file typically becomes ~50MB after compression. This happens transparently on upload - you don't need to pre-convert your files. Already-compressed formats like MP3 are kept as-is. See [audio compression settings](../admin-guide/system-settings.md#audio-compression) for configuration options.
+
When you upload a file, it immediately appears in the upload queue with a progress bar showing the upload status. Once uploaded, you can add [tags](settings.md#tag-management-tab), set a custom title, and configure processing options before starting transcription. Tags can include [custom AI prompts](../admin-guide/prompts.md) for specialized processing.
## Recording Live Audio