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.0.tar.gz (125.0 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.0-py3-none-any.whl (123.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: finish_sound-0.2.0.tar.gz
  • Upload date:
  • Size: 125.0 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.0.tar.gz
Algorithm Hash digest
SHA256 992a1075013cb9dbaabc929d3c1bed69108914dfa3d4dfd44892412ebe75b21d
MD5 469bd1f830240dafc9a69f4b0e6b44fd
BLAKE2b-256 e2161bc3975a7f3b74a9b4b32ab78e992a5b082e8cb1de9c5cf5e499b09c9e94

See more details on using hashes here.

File details

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

File metadata

  • Download URL: finish_sound-0.2.0-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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4d560441f514ce76253cfd75558035cc8ed3eaed3894ca106ecfbec7c2ae96bf
MD5 e594abe2f190922b50d9753cb0bee2be
BLAKE2b-256 e095d37c803b5c2b36cc3b2a585ac66480beb65142ec334b05ad8ecb6f68d644

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