Browse Source

added readme

subDesTagesMitExtraKaese 3 years ago
parent
commit
69d58e5702
2 changed files with 17 additions and 1 deletions
  1. 2 1
      main.py
  2. 15 0
      readme.md

+ 2 - 1
main.py

@@ -9,8 +9,9 @@ import audioHandler
 mqtt_host = "localhost"
 mqtt_port = 1883
 interval = 20.0 # sec
+use_audio_sink = False
 
-audio = audioHandler.Listener(dataTime=interval if interval<5 else 5, agcTime=interval, input=True)
+audio = audioHandler.Listener(dataTime=interval if interval<5 else 5, agcTime=interval, input=not use_audio_sink)
 
 
 def main():

+ 15 - 0
readme.md

@@ -0,0 +1,15 @@
+# MQTT Audio Level Meter
+
+Publishes the volume of an audio source to a MQTT server.
+
+Test setup: Raspberry Pi with an USB microphone and a local Mosquitto server
+
+Can be configured to capture audio output or input under Linux and Windows.
+
+## Installation
+
+```bash
+python3 -m pip install paho.mqtt
+python3 -m pip install pyaudio
+python3 main.py
+```