nickeh Posted December 5, 2014 Share Posted December 5, 2014 Hi,I tried to connect to my Mumble server using ICE and Python but I can't get it to work.I have copied Murmur.ice to the same folder as my python script but when I execute the script import Ice Ice.loadSlice("Murmur.ice") I get this: error: Can't open include file "Ice/SliceChecksumDict.ice" #include <Ice/SliceChecksumDict.ice> I found the SliceChecksumDict.inc under /usr/share/Ice-3.5.1/slice/Ice/SliceChecksumDict.ice and I tried to copy it to a subfolder called Ice under the folder were my python scrip was but without success.There is probably a very easy solution to this but I havn't figured it out.Thanks in advance! Quote Link to comment Share on other sites More sharing options...
darkman802 Posted December 5, 2014 Share Posted December 5, 2014 Try this, -I tells ice where to look for other include directories that contain .ice files. Import Ice Ice.loadSlice('-I/usr/share/Ice-3.5.1/slice', ['Murmur.ice']) import Murmur Quote Link to comment Share on other sites More sharing options...
nickeh Posted December 5, 2014 Author Share Posted December 5, 2014 Thanks darkman802!!!How do I provide the ICE read/write password? I have this code #!/usr/bin/python import Ice Ice.loadSlice('-I/usr/share/Ice-3.5.1/slice', ['Murmur.ice']) import Murmur comm = Ice.initialize() pxy = comm.stringToProxy("Meta:tcp -h 127.0.0.1 -p 6502") meta = Murmur.MetaPrx.checkedCast(pxy) server = meta.getServer(1) channels = server.getChannels() users = server.getUsers() and I get this output indicating that I'm missing the credentials Traceback (most recent call last): File "mumbleICE.py", line 9, in <module> server = meta.getServer(1) File "Murmur.ice", line 3949, in getServer Murmur.InvalidSecretException: exception ::Murmur::InvalidSecretException { } Quote Link to comment Share on other sites More sharing options...
darkman802 Posted December 5, 2014 Share Posted December 5, 2014 comm.getImplicitContext().put('secret', 'yourSecretGoesHere') Quote Link to comment Share on other sites More sharing options...
nickeh Posted December 5, 2014 Author Share Posted December 5, 2014 Yes, I found that line before but when I use it I get this comm.getImplicitContext().put('secret', 'mySecretHere') AttributeError: 'NoneType' object has no attribute 'put' the whole code looks like this.#!/usr/bin/python import Ice Ice.loadSlice('-I/usr/share/Ice-3.5.1/slice', ['Murmur.ice']) import Murmur comm = Ice.initialize() comm.getImplicitContext().put('secret', 'read') pxy = comm.stringToProxy("Meta:tcp -h 127.0.0.1 -p 6502") meta = Murmur.MetaPrx.checkedCast(pxy) server = meta.getServer(1) channels = server.getChannels() state = server.getChannelState(2) users = server.getUsers() Also what should I look for when I want to see who is talking on the channels including anyone whispering (to another channel and to whom)?Maybe I should have explained my case from the beginning but here it goes :)I'm trying to use Mumble as a intercom for broadcast. For now I have figured out how the beltpacks should work but the basestation requires the operator to see who is calling. The beltpacks are based on Olimex A20 mini computers (about the same size as a Raspberry Pi case) that only have one button (headless and only running Mumble + python script). When the button is pressed a python script reads the GPIO and sends (the set key code to Mumble running in X) for example CTRL+1 (Whisper to the Director) as long as it is pressed.There are in the beginning atleast two basestations (small box on the table, Video (Director) + Audio (Sound Designer)) and the director has for example three buttons. One button for talking to cameras CTRL+1 = Whisper to camera group, CTRL + 2 Floormanager and CTRL +3 Audio basestation (Sound Designer). When a button is pressed a led will light up showing that is broadcasting, double clicking locks the channel to stay broadcasting. If for example the Sound Engineer (Audio channel) wants to talk to the director (that sits in the Video channel) he/she can hear the broadcast but I would like to have another led lighing up above the audio button so that is easier to see who is broadcasting. That's is why I would like to find who is talking to who. Example channel setup (I didn't remember how all titles are translated so a few are probably wrong :) )Audio -Sound Designer -Sound Technician 1 -Sound Technician 2 Video -Director -CAM 1 -CAM 2 -CAM 3 -FMLIGHT (in future) -Head of Camera -Lightdesk -Light Technician 1and the list could go on :) Quote Link to comment Share on other sites More sharing options...
Moderators fwaggle Posted December 5, 2014 Moderators Share Posted December 5, 2014 It's been ages since I mucked around with Ice under Python, but try switching the order around: comm = Ice.initialize() pxy = comm.stringToProxy("Meta:tcp -h 127.0.0.1 -p 6502") comm.getImplicitContext().put('secret', 'read') I'm not sure if it'll help or not, but Ice does lots of things weird. Quote Full disclosure: I used to run a commercial Mumble host, and my opinions do not reflect the opinions of the Mumble project. Avatar is stolen from here Link to comment Share on other sites More sharing options...
nickeh Posted December 5, 2014 Author Share Posted December 5, 2014 I have tried it like you suggested fwaggle and in a few other places but I always get the same error. Disabling the line (and changing settings in Murmur) works perfectly. So still open for suggestions ;) Quote Link to comment Share on other sites More sharing options...
darkman802 Posted December 6, 2014 Share Posted December 6, 2014 You probably need to set up the shared context in Ice. initdata = Ice.InitializationData() initdata.properties = Ice.createProperties(None, initdata.properties) initdata.properties.setProperty('Ice.ImplicitContext', 'Shared') comm = Ice.initialize(sys.argv, initdata) comm.getImplicitContext().put('secret', 'mySecretHere') Quote Link to comment Share on other sites More sharing options...
nickeh Posted December 6, 2014 Author Share Posted December 6, 2014 You rock darkman802!Now it is working, so where can I read more about how to talk with the Mumble server? I still need to know who is speaking/whispering and to whom.Thanks in advance! Quote Link to comment Share on other sites More sharing options...
Lindee Posted December 6, 2014 Share Posted December 6, 2014 As a old theatre guy, and now an AV production guy....THIS IS AWESOME!!! Once you get it where you're happy, please put up specs and everything or start selling this! (If mumble TOS/Copyright allow) Quote Link to comment Share on other sites More sharing options...
darkman802 Posted December 6, 2014 Share Posted December 6, 2014 The Ice interface is documented here: http://mumble.sourceforge.net/slice/1.3.0/Murmur.htmlIt lists all the interfaces, methods, callbacks, structures, etc. You'd have to look around to see if any of those would be able to tell you about whispering and such.Mumble also has an IRC channel you could join to talk to people about it, though people are not always around.The channel is #mumble on irc.freenode.org Quote Link to comment Share on other sites More sharing options...
nickeh Posted December 7, 2014 Author Share Posted December 7, 2014 Excellent darkman802, I'll have to take a look at that. And to Lindee, the idea when I started was to document everything and make it available to everybody. But I can't make any promises yet.Thanks!!! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.