Progress bars with sound enhancements
Project description
tqdm_sound adds sounds to the well-known progress bar library TQDM.
It extends the TQDM base class, so anything you can do in TQDM you can do in this library.
It can self-mute during mouse or keyboard activity.
Motivation
I was renovating while running very long ML tasks, and I wanted a way of tracking how everything was going while I had paint on my hands.
This was inspired by the work of Ryoji Ikeda and includes sounds similar to data.matrix. You can create any set of WAV files for your project, but I picked this because it’s subtle and unobtrusive.
Use Cases
Screen-free progress tracking
Accessibility for developers using screen readers
You hate your co-workers
Installation
pip install tqdm_sound
Examples
Basic Example
from tqdm_sound import TqdmSound
import random
import time
# Example usage:
if __name__ == "__main__":
sound_monitor = TqdmSound(theme="ryoji_ikeda", activity_mute_seconds=1)
my_list = [0] * 50
progress_one = sound_monitor.progress_bar(my_list, desc="Processing", volume=100, background_volume=30, end_wait=1, ten_percent_ticks=True)
for _ in progress_one:
time.sleep(random.uniform(.2, .5))
Silence When Active
If you’re actively using your mouse/keyboard, you can silence the program via the activity_mute_seconds parameter. To mute for 5 seconds after mouse/keyboard activity:
sound_monitor = TqdmSound(theme="ryoji_ikeda", activity_mute_seconds=5)
my_list = [0] * 10
progress_one = sound_monitor.progress_bar(my_list, desc="Processing", volume=100, background_volume=30, end_wait=1, ten_percent_ticks=False)
for _ in progress_one:
time.sleep(random.uniform(.2, .5))
Play Final Sound
This is just a shortcut to play program_end_tone.wav:
sound_monitor.play_final_end_tone(50)
Play Any Sound in the Theme Directory
Play any WAV file in the sounds/your_theme directory:
sound_monitor.play_sound_file('short_beep.wav', 50)
Sound Files
Add your own collection of sound files by adding a directory to the sounds folder, which will correspond to the “theme” argument.
Interval Sounds
click_###.wav are played at every interval that is not the start, middle, or end. You can have any number of these files in this format to increase/decrease variation.
Major Sounds
start_tone.wav plays at the start of each loop.
mid_tone.wav plays at the midpoint of each loop.
end_tone.wav plays at the end of each loop.
semi_major.wav plays at every 10% step when ten_percent_ticks=True.
program_end_tone.wav is an optional sound that plays at the end of a given loop—this is just a convenience function you might use as the last loop in your program.
Project details
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 tqdm_sound-1.2.1.tar.gz.
File metadata
- Download URL: tqdm_sound-1.2.1.tar.gz
- Upload date:
- Size: 324.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
69db60e1a195db4a14490d3dc6c33b1465e6708484f9b65503c9c446cd01a6d5
|
|
| MD5 |
9468b21c95a5a07eec3c35bd20475cc7
|
|
| BLAKE2b-256 |
e6c392c5a619c8262229572ec8c9758e0dbf8bf04703eb4c09225bc41a211ed2
|
Provenance
The following attestation bundles were made for tqdm_sound-1.2.1.tar.gz:
Publisher:
python-publish.yml on looking-glass-station/tqdm-sound
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
tqdm_sound-1.2.1.tar.gz -
Subject digest:
69db60e1a195db4a14490d3dc6c33b1465e6708484f9b65503c9c446cd01a6d5 - Sigstore transparency entry: 220256507
- Sigstore integration time:
-
Permalink:
looking-glass-station/tqdm-sound@68e750c33bd492cbd533bce0382a82a6dd6c40e6 -
Branch / Tag:
refs/tags/v1.2.1 - Owner: https://github.com/looking-glass-station
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@68e750c33bd492cbd533bce0382a82a6dd6c40e6 -
Trigger Event:
release
-
Statement type:
File details
Details for the file tqdm_sound-1.2.1-py3-none-any.whl.
File metadata
- Download URL: tqdm_sound-1.2.1-py3-none-any.whl
- Upload date:
- Size: 325.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
292ab74ea4d2f0ad7f008526159ea78d92f5babb68fee1bfcc036340e6ba16a4
|
|
| MD5 |
8f1a4a0c942eb2637af51bde1d85293a
|
|
| BLAKE2b-256 |
42bdb61714c7ef7c52d3b6410ea53373e3775667aa1b9dcc564aa3113268bf1f
|
Provenance
The following attestation bundles were made for tqdm_sound-1.2.1-py3-none-any.whl:
Publisher:
python-publish.yml on looking-glass-station/tqdm-sound
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
tqdm_sound-1.2.1-py3-none-any.whl -
Subject digest:
292ab74ea4d2f0ad7f008526159ea78d92f5babb68fee1bfcc036340e6ba16a4 - Sigstore transparency entry: 220256521
- Sigstore integration time:
-
Permalink:
looking-glass-station/tqdm-sound@68e750c33bd492cbd533bce0382a82a6dd6c40e6 -
Branch / Tag:
refs/tags/v1.2.1 - Owner: https://github.com/looking-glass-station
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@68e750c33bd492cbd533bce0382a82a6dd6c40e6 -
Trigger Event:
release
-
Statement type: