mumble-ruby icon indicating copy to clipboard operation
mumble-ruby copied to clipboard

how can I set input and output device to use?

Open utillity opened this issue 10 years ago • 6 comments

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

utillity avatar Dec 30 '14 14:12 utillity

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.

dafoxia avatar Dec 30 '14 20:12 dafoxia

thanks! as I am not familiar with all this, do you think you could post sample code? thanks!

utillity avatar Dec 31 '14 13:12 utillity

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.

dafoxia avatar Dec 31 '14 16:12 dafoxia

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 avatar Jan 05 '15 19:01 utillity

@utillity Please let us know how it worked, I'd like the same, please.

ways avatar May 29 '15 14:05 ways

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.

utillity avatar May 29 '15 16:05 utillity