encrypt 4 years ago
parent
commit
17c25220ad
2 changed files with 25 additions and 2 deletions
  1. 23 0
      mumble-bot/README.md
  2. 2 2
      mumble-bot/bot.py

+ 23 - 0
mumble-bot/README.md

@@ -0,0 +1,23 @@
+mumble-bot
+==========
+
+prende l'audio del canale, ne fa stdout.
+
+install
+--------
+
+```
+pip install --user pyaudio # che in realta non serve poi lo levo
+git clone  https://github.com/azlux/pymumble # quest non sta su pypy
+cd pymumble
+python3 setup.py install --user
+```
+
+ascolta
+-------
+
+con pulseaudio
+
+```
+python3 bot.py | paplay --raw --rate=48000 --format=s16le --channels=1
+```

+ 2 - 2
mumble-bot/bot.py

@@ -11,7 +11,7 @@ import pyaudio
 pwd = ""  # password
 server = "mumble.esiliati.org"  # server address
 nick = "TubiaBot"
-channel = "chiacchiere"
+channel = "radiospore"
 port = 64738  # port number
 
 # pyaudio set up
@@ -33,7 +33,7 @@ mumble.callbacks.set_callback(PCS, sound_received_handler)
 mumble.set_receive_sound(1)  # Enable receiving sound from mumble server
 mumble.start()
 mumble.is_ready()  # Wait for client is ready
-mumble.channels.find_by_name("radiospore").move_in()
+mumble.channels.find_by_name(channel).move_in()
 mumble.users.myself.mute()
 
 # constant capturing sound and sending it to mumble server