https://github.com/njh/petey
Push to Talk - send short audio messages over MQTT
https://github.com/njh/petey
mqtt ptt
Last synced: about 1 month ago
JSON representation
Push to Talk - send short audio messages over MQTT
- Host: GitHub
- URL: https://github.com/njh/petey
- Owner: njh
- Created: 2016-04-18T15:58:50.000Z (over 9 years ago)
- Default Branch: main
- Last Pushed: 2021-07-29T23:10:07.000Z (about 4 years ago)
- Last Synced: 2025-06-25T13:04:17.462Z (4 months ago)
- Topics: mqtt, ptt
- Language: Ruby
- Homepage:
- Size: 12.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Petey: Push To Talk
===================Requirements: Ruby 2.0 and PulseAudio
Petey is a script for sending short audio messages over MQTT.
Press the space bar button to record a short audio message,
which is then sent to all the other people running petey.
They will then all hear the message as soon as the message has been received.
You can also send oinks.Installing
----------On Mac OS X:
brew install rbenv ruby-build pulseaudio
rbenv install 2.1.2
bundle installOn Debian Linux:
apt-get install ruby bundler pulseaudio pulseaudio-utils
bundle installRunning
-------$ ruby petey.rb
Welcome to Petey!
space: Record Sound
o: Send Oink
q: QuitSetting up PulseAudio on Mac OS X
---------------------------------I found that Pulse audio was not using the 'Built In' inputs and outputs by default on my MacBook.
I resolved this by getting a list of the outputs using:
pactl list sinks
Then select the corresponding Sink number using:
pacmd set-default-sink 1
The same can be done for the source using:
pactl list sources
pacmd set-default-source 1Oink
----The Oink sound effect came from:
http://soundbible.com/1221-Pig-Oink.htmlLicense: Creative Commons Attribution 3.0
Recorded by: Mike Koenig
The alaw file was created using:
sox oink.wav -e a-law -c 1 -r 8000 -t raw oink.alaw