Skip to content

kelno/audio-journal-transcriber

Repository files navigation

Audio transcription and summary script for my personal Obsidian Vault.

Requirements

Requires uv package manager.
Requires ffmpeg in path.

Installation

uv sync

Configuration

The application can be configured via config files or env variables. Most configuration values must be provided, see config.default.toml to check which ones are set by default.

Configuration will be merged in the order of priority:

  • Environment variables (prefixed with TRANSCRIBER_)
  • config.custom.toml: From working directory, overrides specific values.
  • config.default.toml: From this repository. Provides base values.

For example you can create a config.custom.toml with only the keys you want to change:

[text]
api_key = "sk-xxxx"

[audio]
api_base_url = "http://localhost:8000/v1"
stream = true

Environment variables format

Some examples:

TRANSCRIBER_GENERAL__DELETE_SOURCE_AUDIO_AFTER_DAYS=30
TRANSCRIBER_TEXT__API_KEY=sk-xxxx

CLI usage

See usage with:

uv run transcriber --help
# or when in venv
transcriber --help

Running tests

Run the test suite with uv from the repository root:

uv run pytest

To run a single test file:

uv run pytest tests/test_transcribe_bundle.py -q

Docker / Podman

Build

# Get the current git tag
$version = git describe --tags --abbrev=0

# Build the image
docker build --build-arg VERSION=$version -t audio-journal-transcriber:$version .

Container configuration

You can either use env variables or mount a config file at /app/config.custom.toml.
See "Configuration" section above for details.

Examples

# Using env variables 
docker run -v /path/to/input:/data/input \
           -v /path/to/store:/data/store \
           -e TRANSCRIBER_GENERAL__DELETE_SOURCE_AUDIO_AFTER_DAYS=30 \
           -e TRANSCRIBER_GENERAL__MIN_LENGTH_SECONDS=10.0 \
           -e TRANSCRIBER_TEXT__SUMMARY_ENABLED=true \
           -e TRANSCRIBER_TEXT__API_BASE_URL=https://api.openai.com/v1/ \
           -e TRANSCRIBER_TEXT__MODEL=gpt-4o-mini \
           -e TRANSCRIBER_TEXT__API_KEY=sk-xxxx \
           -e TRANSCRIBER_AUDIO__API_BASE_URL=https://api.openai.com/v1/ \
           -e TRANSCRIBER_AUDIO__MODEL=whisper-1 \
           -e TRANSCRIBER_AUDIO__API_KEY=sk-xxxx \
           audio-journal-transcriber:latest

# Using config file
docker run -v /path/to/input:/data/input \
           -v /path/to/store:/data/store \
           -v /path/to/config.toml:/app/config.custom.toml \
           -e TRANSCRIBER_GENERAL__INPUT_DIR=/data/input \
           -e TRANSCRIBER_GENERAL__STORE_DIR=/data/store \
           audio-journal-transcriber:latest

# (Or combine both as needed)

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Packages

 
 
 

Contributors

Languages