Reusable sermon transcription and Bible verse suggestion engine.
Project description
Devar Engine
Reusable sermon transcription and Bible verse suggestion engine.
devar-engine is the Python engine package for building sermon-assistant
workflows. It can transcribe sermon audio, maintain rolling transcript files,
and suggest Bible verses from a local JSON Bible file. It works as a
command-line tool for local experiments and as a library that can be imported by
a backend service.
Installation
Install from PyPI:
python -m pip install devar-engine
Install with local microphone support:
python -m pip install "devar-engine[audio]"
Install with local Moonshine transcription support:
python -m pip install "devar-engine[transcription]"
Install both microphone capture and transcription support:
python -m pip install "devar-engine[all]"
Install from a checked-out repository while developing:
cd /path/to/devar.engine
python -m pip install -e ".[all]"
Bible Data
Verse suggestions require a local Bible JSON file. The expected shape is a flat array of verse objects:
[
{
"book": "John",
"chapter": 3,
"verse": 16,
"text": "For God so loved the world..."
}
]
Required fields:
book: Bible book name.chapter: Chapter number.verse: Verse number.text: Verse text.
An optional translation field is accepted, but it is not required. Bible files
are runtime data and should not be committed to source control unless you have
the right to distribute them.
Command-Line Usage
devar-engine installs two console commands:
devar-engine-transcribe: transcribes audio into a transcript file.devar-engine-suggest: suggests Bible verses from transcript text or an ad-hoc query.
Suggest Verses From Text
devar-engine-suggest query \
--bible data/nkjv.json \
--text "Do not be anxious about anything" \
--top-k 5
Suggest Verses From A Transcript
Run one suggestion cycle:
devar-engine-suggest once \
--bible data/nkjv.json \
--transcript-file transcripts/live.jsonl
Watch a transcript and print suggestions repeatedly:
devar-engine-suggest loop \
--bible data/nkjv.json \
--transcript-file transcripts/live.jsonl \
--interval-seconds 10 \
--last-seconds 15
Transcribe A WAV File
devar-engine-transcribe \
--source wav-file \
--input recordings/sermon.wav \
--duration 3600 \
--transcript-output transcripts/sermon.jsonl \
--no-audio-output
For best results, use uncompressed WAV audio with:
- 16 kHz sample rate.
- 16-bit signed PCM samples.
- Mono audio.
Transcribe From A Microphone
Install the audio and transcription extras first:
python -m pip install "devar-engine[all]"
List available input devices:
devar-engine-transcribe --list-devices
Record and transcribe:
devar-engine-transcribe \
--source microphone \
--duration 3600 \
--transcript-output transcripts/live.jsonl \
--audio-output recordings/live.wav
Test Without Audio Hardware
devar-engine-transcribe \
--source tone \
--duration 5 \
--transcript-output transcripts/tone.jsonl \
--no-audio-output
Python API
Suggest Verses
from pathlib import Path
from devar_engine.suggestions import BibleIndex, keyword_suggest
bible = BibleIndex(Path("data/nkjv.json"))
results = keyword_suggest(
bible,
"God loved the world and gave His Son",
top_k=3,
)
for result in results:
print(result.reference)
print(result.display_text)
Read Recent Transcript Context
from pathlib import Path
from devar_engine.suggestions import read_recent_context
text, timestamp_range = read_recent_context(
Path("transcripts/live.jsonl"),
last_seconds=15,
)
Transcribe WAV Bytes In A Backend
from devar_engine.transcription import transcribe_wav_bytes
with open("recordings/sermon.wav", "rb") as f:
wav_bytes = f.read()
text = transcribe_wav_bytes(wav_bytes)
Convert PCM To WAV Bytes
from devar_engine.audio import AudioSettings, pcm_to_wav_bytes
settings = AudioSettings(sample_rate=16000, channels=1, sample_width=2)
wav_bytes = pcm_to_wav_bytes(raw_pcm_bytes, settings)
Transcript Format
JSONL transcript entries are written one object per line:
{"timestamp": "00:00 - 00:05", "text": "Grace and peace to you"}
The suggestion command reads the most recent timestamped entries when possible. For plain-text transcripts, it falls back to the last characters in the file.
Runtime Files
Typical local directories:
data/ Bible JSON files
recordings/ optional WAV recordings
transcripts/ generated transcript files
Treat these as local runtime directories. Generated transcripts, recordings, and licensed Bible files should normally stay out of git.
License
Devar Engine is licensed under the Apache License 2.0.
This package does not include Bible translations, recordings, transcripts, speech model weights, or other runtime data. Those assets may have their own licenses and usage restrictions.
Development
Run the package tests from this directory:
PYTHONPATH=src PYTHONDONTWRITEBYTECODE=1 python -m unittest discover -s tests -v
Run a CLI smoke test with a local Bible file:
PYTHONPATH=src python -m devar_engine.cli.suggest query \
--bible data/nkjv.json \
--text "The Lord is my shepherd"
Releasing
Build and verify distributions from the repository root:
python -m pip install -e ".[dev]"
python -m build
python -m twine check dist/*
Test a release on TestPyPI first:
python -m twine upload --repository testpypi dist/*
python -m pip install \
--index-url https://test.pypi.org/simple/ \
--extra-index-url https://pypi.org/simple \
devar-engine
Publish the real release to PyPI:
python -m twine upload dist/*
GitHub Actions workflows are also included for TestPyPI and PyPI publishing.
They are triggered manually with workflow_dispatch or automatically when you
push a tag like devar-engine-v0.1.2.
Troubleshooting
Bible file not found
Pass --bible /path/to/bible.json, or place the file where your command expects
it.
No suggestions
Make sure the transcript has meaningful sermon text and the Bible file uses the required flat verse-object shape.
WAV file settings do not match
Use 16 kHz, 16-bit, mono WAV input, or convert the file before passing it to
devar-engine-transcribe.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file devar_engine-0.1.1.tar.gz.
File metadata
- Download URL: devar_engine-0.1.1.tar.gz
- Upload date:
- Size: 27.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
92efbdb9ec4d221a9e294394034942e55a312d8488818c38623cb7262f0f86f6
|
|
| MD5 |
bb21d7843376fc828b7d3ebefd2e6789
|
|
| BLAKE2b-256 |
37f5c0eced7fb15831b96b1d209e5d18273c85b97eff1c0a9a137da9ebb8afe3
|
Provenance
The following attestation bundles were made for devar_engine-0.1.1.tar.gz:
Publisher:
devar-engine-pypi.yml on baasare/devar.engine
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
devar_engine-0.1.1.tar.gz -
Subject digest:
92efbdb9ec4d221a9e294394034942e55a312d8488818c38623cb7262f0f86f6 - Sigstore transparency entry: 1364575596
- Sigstore integration time:
-
Permalink:
baasare/devar.engine@4631c9ce5fbb56f278a2ad72a5d82c61e78b60e2 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/baasare
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
devar-engine-pypi.yml@4631c9ce5fbb56f278a2ad72a5d82c61e78b60e2 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file devar_engine-0.1.1-py3-none-any.whl.
File metadata
- Download URL: devar_engine-0.1.1-py3-none-any.whl
- Upload date:
- Size: 23.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2398f0d4721665db4186df43c29b787ad115d50653b9b5f3845ca5a4c9740f8c
|
|
| MD5 |
f080697aab31c17abca3f3e7cd4a3b57
|
|
| BLAKE2b-256 |
8d4b28d890e59e2b24eae47f0b7665e48f2d318125a51b915c2b109b8589305b
|
Provenance
The following attestation bundles were made for devar_engine-0.1.1-py3-none-any.whl:
Publisher:
devar-engine-pypi.yml on baasare/devar.engine
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
devar_engine-0.1.1-py3-none-any.whl -
Subject digest:
2398f0d4721665db4186df43c29b787ad115d50653b9b5f3845ca5a4c9740f8c - Sigstore transparency entry: 1364575660
- Sigstore integration time:
-
Permalink:
baasare/devar.engine@4631c9ce5fbb56f278a2ad72a5d82c61e78b60e2 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/baasare
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
devar-engine-pypi.yml@4631c9ce5fbb56f278a2ad72a5d82c61e78b60e2 -
Trigger Event:
workflow_dispatch
-
Statement type: