Skip to main content

dinscribe audio transcription

Processes audio through a three-step pipeline to produce a transcription JSON: denoising (demucs), voice activity detection (Silero VAD), and transcription (Whisper).

Installation

pip install dinscribe

This installs CPU-only torch by default. For GPU acceleration, install the CUDA build first:

pip install torch torchaudio --index-url https://download.pytorch.org/whl/cu124
pip install dinscribe

dinscribe uses CUDA automatically when available and warns at startup if it is not.

On first run, dinscribe copies default config files to your platform config directory:

  • Windows: %APPDATA%\dinscribe\
  • macOS: ~/Library/Application Support/dinscribe/
  • Linux: ~/.config/dinscribe/

Edit config.yaml and vocab.txt to customize settings.

CLI usage

dinscribe input/audio.mp3          # single file
dinscribe input/                   # all audio files in a folder
dinscribe input/audio.mp3 -f       # force re-run all steps
dinscribe input/audio.mp3 -c path/to/config.yaml   # custom config
dinscribe input/audio.mp3 -o results/              # custom output dir

Each step checks whether its output already exists and skips it if so. Use -f to force all steps to re-run.

Output is written to output/<filename>/ and contains:

  • <filename>_denoised.wav (vocals isolated from background noise)
  • <filename>_vad.json (detected speech segment boundaries)
  • <filename>_transcription.json (final transcription with timestamps)

Python API

from pathlib import Path
import dinscribe
from dinscribe import PipelineConfig, VadConfig, TranscribeConfig

# Run the full pipeline with defaults
dinscribe.process_file(
    input_path=Path("recording.wav"),
    output_dir=Path("output"),
)

# Custom config
config = PipelineConfig(
    vad=VadConfig(threshold=0.4, max_segment_length_sec=20),
    transcribe=TranscribeConfig(model="small", language="en"),
)
dinscribe.process_file(Path("recording.wav"), Path("output"), config=config)

# Or use individual stages
from dinscribe import denoise, vad, transcribe

denoised = denoise.run(Path("recording.wav"), Path("output/recording"))
vad_file  = vad.run(denoised, Path("output/recording"))
result    = transcribe.run(denoised, vad_file, Path("output/recording"))

Configuration

denoise:
  model: htdemucs        # htdemucs | htdemucs_ft | mdx | mdx_extra | htdemucs_6s

vad:
  threshold: 0.5         # 0.0–1.0, higher = requires clearer speech
  min_speech_duration_ms: 250
  min_silence_duration_ms: 100
  padding_ms: 500
  max_segment_length_sec: 30
  merge_within_sec: 1.0

transcribe:
  model: base            # tiny | base | small | medium | large
  language: en           # set to null to auto-detect
  temperature: null      # null = Whisper fallback sequence, 0 = greedy
  no_speech_threshold: 0.6
  logprob_threshold: -1.0
  compression_ratio_threshold: 2.4
  condition_on_previous_text: false
  vocab_file: null       # path to domain-specific vocabulary, defaults to vocab.txt in config dir

Add domain-specific vocabulary to vocab.txt to improve transcription accuracy on unusual words and jargon. For noisy or technical audio, set temperature: 0 to disable attempts to fallback to higher-temperature decoding, and consider filtering out any common hallucinations specific to your dataset.

Metadata

Release files for dinscribe 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for dinscribe 0.2.0
File Size Uploaded Provenance
dinscribe-0.2.0.tar.gz 14.1 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for dinscribe 0.2.0
File Interpreter ABI Platform
dinscribe-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 29.8 kB

Release files / dinscribe-0.2.0.tar.gz

Download URL dinscribe-0.2.0.tar.gz
Size 14.1 kB
Tags Source
SHA-256 checksum
How to use checksums
8e21a5361cbf7876bb0092e860af19cab2f6a1376d2e1ff256adff2563b16845
BLAKE2b-256 checksum
How to use checksums
25eea6508ad18d2f8255144bd732731b9ce3b05540693680b437044f0c62fae8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.9

Release files / dinscribe-0.2.0-py3-none-any.whl

Download URL dinscribe-0.2.0-py3-none-any.whl
Size 15.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ae821331637b792e9bd9639eaa745ffba9bc4a9833b2ff38e2462eb2010fc681
BLAKE2b-256 checksum
How to use checksums
52137ce3d1b979164a92c258b84b14d5df82342a2c6f922a6cb5a31f8f96f7ae
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.9

Security for dinscribe 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page