mumble-ruby
mumble-ruby copied to clipboard
how can I set input and output device to use?
I would like to auto-connect to a server and use the local microphone and speaker for communication. The script works fine but I can't hear or speak. any help would be apprechiated! regards
It can only handle FIFO handles. I think it will be possible to create one process witch read from soundcard microphone and write to FIFO and a second witch play FIFO to soundcard. Using ALSA you need arecord and aplay. See FIFO format about the audioformat.
thanks! as I am not familiar with all this, do you think you could post sample code? thanks!
First create 2 FIFO'S: mknode microphone mknode loudspeaker then use aplay -l and arecord -l to detect which soundcard you will use. arecord -f S16_LE -r 48000 -D hw:0 -t raw > path-to-microphone-fifo will record into FIFO from 1. soundcard (hw:0) aplay path-to-loudspeaker-fifo will play fifo to default soundcard, default audio out. This 2 things should be started in a shell script before you start your bot. Best is to seperate it into their own screens. (man screen or man tmux) Then you can start your bot and set the 2 pipes.
I'm lack of time and I have no testing machine yet, so I can't post tested code. You have to get little familar with ruby and your sound-system on your machine. If you don't use ALSA your steps will be completly different.
PS: Sorry if my text is hard to understand, my mother speak is'nt english.
will try, thanks!! I get the idea and think I can go with ALSA - will let you know the results, thanks again for your efforts!
@utillity Please let us know how it worked, I'd like the same, please.
Hi, sorry, did not get it to work and gave up as there does not seem to be a true shell client with realtime communication support out there currently.
Von: Ways [mailto:[email protected]] Gesendet: Freitag, 29. Mai 2015 16:11 An: mattvperry/mumble-ruby Cc: Tilfried Weissenberger Betreff: Re: [mumble-ruby] how can I set input and output device to use? (#42)
@utillityhttps://github.com/utillity Please let us know how it worked, I'd like the same, please.
— Reply to this email directly or view it on GitHubhttps://github.com/mattvperry/mumble-ruby/issues/42#issuecomment-106818717.