BrenMurrell / slack-audiobot

Adding audio feedback to Slack
http://brenmurrell.github.io/slack-audiobot
34 stars 25 forks source link

No sound :( (still awesome script though...) #2

Open martijn1k opened 8 years ago

martijn1k commented 8 years ago

Thanks for making this, everything seems to work... except 1 thing. No sounds :( it says it's playing in Slack and in the console, but there's nothing happening.

Text to speech does work. But mp3's are not playing, can someone advise how to debug?

Kind of a node-noob. Currently running the script from the User\Downloads folder... could that be a problem?

Thanks in advance.

martijn1k commented 8 years ago

Also verified... when I run "mplayer sounds/tada.mp3" in CMD from the script's location, it works. Any ideas?

BrenMurrell commented 8 years ago

Hrm weird... not sure what's going on there. I've tried running it from a couple of different places - it shouldn't really matter where. Is this on Mac or Windows? And sorry for the slow reply, this is pretty much the only thing I've contributed to github so far, and haven't been particularly active. Bad dev!!

martijn1k commented 8 years ago

Thanks for your reply mate! I got it working last week, sorry I forgot to update! Bad me.

I'm using an Intel Compute Stick (HDMI) with Windows 10 Home. There were a couple of things I had to change to get it working.

I changed the mplayer version to 32bit instead of 64bit. I was testing on my local machine, that one was 64 and that's why the mp3 played when I ran mplayer from the console. Doing the same on the Compute Stick displayed a problem in the console, because that version of Win10 was 32bit, I always thought it was backwards compatible, but replacing the 64bit version fixed the error.

Additionally I changed the outputDevice (I commented out the If/else) statement which checks for headphones or speakers, so it always uses this: -ao dsound:device=2. Maybe the stick's settings are flaky, I don't know.

So now we are enjoying the Audiobot in our office too! It works flawlessly and we have a lot of laughs with it. Awesome awesome script, thank you so much for putting this on GitHub!! It runs all day, playing a song on succesful order confirmations and another one on new Azure deployments.

BrenMurrell commented 8 years ago

Super glad to hear you got it sorted. Might have to update this repo to use the 32 bit version - assuming the 32 bit would work on a 64 bit machine.

Our office bot has morphed into a crazy, crazy beast. Somehow I've got to get the code back on track! Hoping to modularize it as we now have it controlling spotify on our office jukebox (it's an old de-commissioned Mac) and handling "dibs" for foosball games. Would be good to publish this as separate repos or perhaps node_modules (now that I know a bit more about npm etc.)

Thanks for the feedback, and get back in touch any time you need help or have any suggestions for further development.