Skip to main content

Create silence marks for your audio files

Creates a list of "silences" timecodes in audio files using FFmpeg and its filter silencedetect.

Currently, only Audipo player marks format is supported.

Prerequisites

Installation

$ pip install audio_silence_marks

Usage

Run the tool against one file or a directory tree:

$ audio_silence_marks . file.mp3 > marks.audipomark
$ audio_silence_marks . '**/*.mp3' > marks.audipomark

Then upload this file to your phone's directory Interal Storage/Audipo/Mark, e.g.:

$ adb push marks.audipomark /storage/emulated/0/Audipo/Mark/

Open your Audipo player, go to Menu > Preferences and click on Import all marks item. Restart the player.

Result

Example:

Unit 23 Unit 24
image image

Processing audiobooks

The script accepts two parameters which highly affect the output, i.e. the amount and the positions of the marks. They are:

  • --noise, -n - noise tolerance in decibels (negated for convenience).

    Acts like a reverse noise gate, passing through parts with the volume below defined. The default value is 50 (which makes -50dB).

  • --duration, -d - duration of silence in milliseconds.

    Sets the minimum duration of silence. The default value is 1000 (ms).

Thus, even a book with some background music which level is less than of the speech, can be successfully marked by --noise parameter tuning.

An example profile for a regular book:

audio_silence_marks -d 400 -n 30 . book.mp3 > marks.audipomark 

This sets -30dB noise level and 400 millisecond minimum silence duration.

Docs

$ audio_silence_marks --help

Usage: audio_silence_marks [OPTIONS] PATH GLOB

  Processes audio files using FFmpeg filter silencedetect and outputs Audipo
  markers JSON with the list of spots placed in the middle of silence
  intervals.

  More info on using GLOBS: https://docs.python.org/3.8/library/glob.html

Arguments:
  PATH  is a path to files. E.g: "."  [required]
  GLOB  argument is a pattern for selecting files. E.g.: '**/*.mp3'
        [required]


Options:
  -t, --target [audipo]           Target format for marks.  [default: audipo]
  -n, --noise INTEGER             Maximum volume of the noise treated as
                                  silence in -dB  [default: 50]

  -d, --duration INTEGER          Minimum length of the silent interval in
                                  milliseconds [default: 1000]

  -l, --list                      Simply lists matched files. Useful for GLOB
                                  debugging.  [default: False]

  --install-completion [bash|zsh|fish|powershell|pwsh]
                                  Install completion for the specified shell.
  --show-completion [bash|zsh|fish|powershell|pwsh]
                                  Show completion for the specified shell, to
                                  copy it or customize the installation.

  --help                          Show this message and exit.

Metadata

Release files for audio-silence-marks 0.1.3

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

Source distribution (sdist)

Source distribution for audio-silence-marks 0.1.3
File Size Uploaded
audio_silence_marks-0.1.3.tar.gz 6.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for audio-silence-marks 0.1.3
File Interpreter ABI Platform
audio_silence_marks-0.1.3-py3-none-any.whl Python 3 none any Details

Total release size: 14.1 kB

Release files / audio_silence_marks-0.1.3.tar.gz

Download URL audio_silence_marks-0.1.3.tar.gz
Size 6.5 kB
Tags Source
SHA-256 checksum
How to use checksums
d46a5d5157892f5260c4afb59893c3499c9b54f9f38a3dcab3445f31c23a003c
BLAKE2b-256 checksum
How to use checksums
e06440a3e26bdbc43a0ba3d3efed632b5c9733643e1ee32268237d9d6da4199a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.4 CPython/3.8.10 Linux/5.4.0-90-generic

Release files / audio_silence_marks-0.1.3-py3-none-any.whl

Download URL audio_silence_marks-0.1.3-py3-none-any.whl
Size 7.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1103b010b669b28b3ea69ebff0b7d839bd4be269c9ffc6e50b60770f357e9378
BLAKE2b-256 checksum
How to use checksums
88853d95bdd653d58e97f581863063cfd98d7fb18de1a6fca9be6f99df74d2eb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.4 CPython/3.8.10 Linux/5.4.0-90-generic

Release history Release notifications | RSS feed

This release

0.1.3 This release

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

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