
Show HN: Jazz up your Python scripts with sound effects - phantomshelby
https://github.com/sangarshanan/jazzit
======
roywiggins
"No Copyright Infringement Intended" is a meaningless disclaimer. Either the
music is public-domain or permissively licensed and you're fine, or it's not
and you're probably not.

If I were you, I'd try and find something that is Creative Commons, CC0 is
best (the most permissive CC license). And then you can say in your disclaimer
that the audio is CC licensed, which is ideal.

~~~
joan_kode
It's obviously not supposed to be a disclaimer of any legal value, judging
from the sentence immediately after your quote: "I might take down these
tracks or add more depending on the number of lawsuits I get slapped with". I
don't particularly condone this attitude, but at least it's pretty clear.
Either you slap him with a lawsuit/DMCA and the tracks will be removed or you
don't and they probably won't.

~~~
phantomshelby
Hey OP here, the tracks I used are taken from
[https://www.youtube.com/user/gamingsoundfx](https://www.youtube.com/user/gamingsoundfx)
which is kinda a royalty-free stock audio library, I realise now that my
statement that was funny when I wrote it might come back to haunt me dreams so
I am gonna update it, Thanks for letting me know

~~~
skocznymroczny
I wouldn't describe it as 'royalty-free stock audio library'. It's obvious
many sounds aren't free to use, be it rips from games or TV shows.

------
H8crilA
This is useful!

Imagine running a long ML training script. Hearing a sound in your speakers
when it ends (successfuly or not) is something I considered implementing, non
ironically, at my job. Never got around to doing it.

~~~
Resinderate
Do this sometimes on mac, simply with:

    
    
      long_running_command && say "That's all folks"

~~~
computronus
The built-in `afplay` shell command works for mp3s and for the stock aiff
sounds under /System/Library/Sounds.

I use this after my long-running Maven builds to play either a happy sound if
the build succeeds or a sad (mocking) sound if it fails, based on the value of
$?.

~~~
lozf
Love the idea of checking the exit code! Seems I have some modifications to
do.

On Linux there's usually `aplay` but you'll need play (sox) or mpv etc. to
play lossy-compressed audio... a bunch of sounds can be found under
/usr/share/sounds/ depending on what's installed.

`espeak-ng` doesn't have as good voices as `say`, but some `festival` ones
come close, although these days I usually use Googles tts, and save the ones I
use frequently.

------
petargyurov
I like this. It doesn't take itself seriously and implementing it via
decorators is a great choice. Might use it in some hobby scripts!

------
fredley
This will go great with my analogue terminal bell!
[https://news.ycombinator.com/item?id=24432930](https://news.ycombinator.com/item?id=24432930)

~~~
phantomshelby
Looks super cool : ) always loved old school

------
mattgreenrocks
In the past, I’ve used the Mac’s text to speech capabilities to help debug
async shell prompts. It’s hard to relate but using aural cues as clues to
execution paths feels quite different from print-based debugging.

~~~
just-juan-post
Ok that's a seriously awesome idea. It's kinda like sonar: You know what's
normal and then listen for the differences?

Could you explain in detail or perhaps make a youtube video?

~~~
jerf
Not the question you asked, but I bet you find this interesting:
[https://www.computerworld.com/article/2771333/the-history-
of...](https://www.computerworld.com/article/2771333/the-history-of-ping---by-
terry-slattery.html) , I'm referencing the part after "The best ping story".

------
canada_dry
Getting mp3 to play on linux via python for some reason has been a challenge,
and I ended up using this abomination:

    
    
      subprocess.Popen(['cvlc','--play-and-exit','/home/me/music/trumpet.mp3'])  
    

Going to give your library a try!

~~~
thehappypm
This doesn't look like an abomination to me!

------
jedberg
FYI if you're on a Mac using a Virtualenv, you might need to do 'pip install
pyobjc' to get the music to play.

------
mixmastamyk
Reminds me of a similar but slightly more direct module I wrote named boombox:

[https://pypi.org/project/boombox/](https://pypi.org/project/boombox/)

------
byteface
great. now to add benny hill theme to all bulid scripts...
[https://www.youtube.com/watch?v=MK6TXMsvgQg](https://www.youtube.com/watch?v=MK6TXMsvgQg)

------
harveywi
Fezzik, do you hear that? That is the sound of ultimate suffering.

------
Fishysoup
I just discovered I've always wanted this.

------
griffinkelly
I have nightmares of the error sounds from Matlab, not sure if I need this in
my python anytime soon.

------
monadic2
This is violence.

