Skip to main content

A simple package that plays a sound when code finishes running

Project description

finish-sound

Current Release: 0.2.0

finish-sound is a simple, silly Python package that plays a sound when your code finishes executing. By defualt, it will be one of four random voices saying "Your code is finished running!"

Demo

For your convenience, we have provided a Google Colab Notebook with which you can use to follow along: Open In Colab

Installation

You can install the package via pip:

pip install finish-sound

For Colab

Example usage

from finish_sound import play_finish_sound_notebook

...
// some long task (eg. training large diffusion model)

play_finish_sound_notebook()

Custom Sounds

You can now create your custom sound to play when your code finishes running using our CustomSound class and play_custom_sound method (built on top of Google's gtts package).

from finish_sound import *

sound = CustomSound()
sound.text = 'This is my custom sound!`

// some long task (eg. scraping websites)

play_custom_sound(sound)

You can also set the local accent of the voice. By default, it is an Australian accent.

sound.accent = 'co.za' # South African accent

Refer to the table below for options.

Local Accent Param
English (Australia) com.au
English (United Kingdom) co.uk
English (United States) us
English (Canada) ca
English (India) co.in
English (Ireland) ie
English (South Africa) co.za
English (Nigeria) com.ng

Local machine

Example usage

from finish_sound import play_finish_sound

...
// some long task (eg. loading llama model checkpoints)

play_finish_sound()

Looking forward

  • Plan to add more voices/sounds
  • Tweak the sound: pitch, volume, etc.

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

finish_sound-0.2.1.tar.gz (124.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

finish_sound-0.2.1-py3-none-any.whl (123.2 kB view details)

Uploaded Python 3

File details

Details for the file finish_sound-0.2.1.tar.gz.

File metadata

  • Download URL: finish_sound-0.2.1.tar.gz
  • Upload date:
  • Size: 124.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.11.5

File hashes

Hashes for finish_sound-0.2.1.tar.gz
Algorithm Hash digest
SHA256 3d77fdac0595e51d0f1f39fb51be6ada74c4ec972753295553194c148094c23f
MD5 6aa4e0b1609d5b0c3e1c4ad4e3758352
BLAKE2b-256 de25622768ce33b544922c4642662bccd687383876c2954e5c52f978707457bf

See more details on using hashes here.

File details

Details for the file finish_sound-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: finish_sound-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 123.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.11.5

File hashes

Hashes for finish_sound-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e0718d6fe5b6825a789be3129b518c8e11ff6e73c1d7f63956004636394f49b1
MD5 43843da29de96f4c86f58fd32dd31b50
BLAKE2b-256 1a841e9b86590d555829fc73a7eadfe98d05ff5a13ebf9cad4bf74ec511ea93f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page