Code Monkey home page Code Monkey logo

talkiepi's Introduction

talkiepi

assembled1 assembled2

talkiepi is a headless capable Mumble client written in Go, written for walkie talkie style use on the Pi using GPIO pins for push to talk and LED status. It is a fork of barnard, which was a great jump off point for me to learn golang and have something that worked relatively quickly.

3D printable enclosure

In the stl directory are the stl files for the enclosure I have designed specifically for the Raspberry Pi B+ board layout (I am using a Raspberry Pi 3 Model B) and the PCB and components from the US Robotics USB Speakerphone. I will be posting a blog post shortly with a full component list and build guide. For more information regarding building a full talkiepi device, go check out my blog at projectable.me.

Installing talkiepi

I have put together an install guide here.

GPIO

You can edit your pin assignments in talkiepi.go

const (
	OnlineLEDPin       uint = 18
	ParticipantsLEDPin uint = 23
	TransmitLEDPin     uint = 24
	ButtonPin          uint = 25
)

Here is a basic schematic of how I am currently controlling the LEDs and pushbutton:

schematic

Pi Zero Fixes

I have compiled libopenal without ARM NEON support so that it works on the Pi Zero. The packages can be found in the workarounds. directory of this repo, install the libopenal1 package over your existing libopenal install.

License

MPL 2.0

Author

talkiepi's People

Contributors

bettse avatar dchote avatar sregister avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

talkiepi's Issues

Installation difficulties

Hello
Is there a complete step by step guide covering all the steps for a rasberry noob?
I have followed your guide over and over step by step and keep running into issues and the service does not run.
There is no step where to set server connection?
I keep getting asked for the mumble users password?

Have the OS updates made this guide obsolete?

Installation Issue, Package opus was not found

Hello,

I am in the middle of the installation process for talkiepi.

When I run the command "go get github.com/dchote/gopus" or "layeh.com/gopus" I get the following error:

"# pkg-config --cflags -- opus
Package opus was not found in the pkg-config search path.
Perhaps you should add the directory containing 'opus.pc'
to the PKG_CONFIG_PATH environment variable
No package 'opus' found
pkg-config: exit status 1"

I am not exactly sure what is causing this, any pointers would be greatly appreciated! I am willing to post any other info needed to help troubleshoot!

Thanks!

Cannot connect to locL server

Keep on connecting to this even when i put the details on the conf file

func main() {
// Command line flags
server := flag.String("server", "talkiepi.projectable.me:64738", "the server to connect to")
username := flag.String("username", "", "the username of the client")
password := flag.String("password", "", "the password of the server")
insecure := flag.Bool("insecure", true, "skip server certificate verification")
certificate := flag.String("certificate", "", "PEM encoded certificate and private key")
channel := flag.String("channel", "talkiepi", "mumble channel to join by default")

flag.Parse()

How to make it connect to my mentioned server?

Fix for Child Channels in client.go

Hey Guys,

Could this be added to the code for client.go

Remove lines 121-123
if b.ChannelName != "" {
b.ChangeChannel(b.ChannelName)
}

Add to line 121
for _, channel := range b.Client.Channels {
if channel.Name == b.ChannelName {
b.Client.Self.Move(channel)
break
}
}

This will fix issues with unable to join to child channels in talkiepi

Thanks Sonic

libopenal1 : Depends: libsndio6.1 (>= 1.1.0) but it is not installable

I am on a pi zero w running Buster. In trying to install the workarounds, I see there is a message that libopenal1 depends on an earlier version of libsndio6.1. From my noob searching, libsndio7.0 is installed and 6.1 cant be installed.

Im tempted to hunt in the code for the earlier version, and manually update to 7.0, but I have no idea what Im doing.

Trigger action on audio received

How would you implement a function call triggered when a client in the same channel starts to speak?

There is:

type AudioListener
type AudioListener interface {
OnAudioStream(e *AudioStreamEvent)
}
AudioListener is the interface that must be implemented by types wishing to receive incoming audio data from the server.
OnAudioStream is called when an audio stream for a user starts. It is the implementer's responsibility to continuously process AudioStreamEvent.C until it is closed.

... In the gumble docs but I can't seem to get it to work...

Any help would be appreciated.
Thank you

Pi Zero Fixes still necessary for Bullseye?

Hey - I really like this project!
I have a working talkiepi on my raspberry pi zero w with the current raspberry pi os lite (Bullseye)
It works without any "Pi Zero Fixes".
Are they superfluous?

Thanks again for your work!

Installation Issue

I am trying to install on a Pi 3B+ and I am getting:

package math/bits: unrecognised import path “maths/bits” (import does not begin with hostname)

Any suggestions? My competence is extremely limited so if I am doing something daft please put up with me!

Separate Microphone & Speaker

I'm trying to use your setup as the basis of an intercom, and I was wondering how to use a separate microphone and speaker, rather than the usb speaker/mic that you've set up for.

Mic and alsa troubles on my Pi Zero

I am building a walky talky based on your wonder ful project

180E9542-4863-4454-8F4A-95479B2257F7

I was able to squish all the hardware into the laser-cut housing. I‘m thrilled that I got the playback to work. However, I‘m not yet able to speak to mumble.

I have a I2s Mic and DAC which work fine on their own. But for the mic I have to do the following for it to work, and I don‘t know how to translate this to your go-project (Also I‘m a more of a python guy, but you GOt me there) anyhow, this is how I use my mic on the command line:

arecord -D hw:0 -f SE_32 -r 22050 -V mono -c 2

Without these parameters the mic simply won‘t work.

So if you should have any idea or inkling on how I can get the mic working this would be wonderful.

Kind regards and thanks a bunch.

As a side note. I plan on releasing the plans and instructions soon on how I built my enclosure. It‘s written in openscad and uses a template from http://makercase.com/. I‘ll inform you once it‘s online.

GPIO on Orange Pi

Have installed this on an Orange Pi Zero which is working fine, can connect to the server, can get audio out of it, but I can't seem to get the GPIO to work. I can access them via Python but not really sure where to start with this Go code. Any thoughts of where to look? I've tried various settings for the pins in talkiepi.go but I feel it's a deeper issue than that. During installation the first issue is that there's no GPIO group and the whole handling of the GPIOs seems to be different.

Push Button - GPIO was working fine, then suddenly stopped..

I would venture to guess this is a ME problem but.. Looking at my full history I don't see how anything I edited or did could have had an effect.

Running the talkpi binary directly and joining the developers server the button works fine but when joining my server as a system service start it does not. (It did for a good while , even got a video of it.).

Any ideas on how to troubleshoot? The GPIO is definitely being recognized and triggered as proven by reading the GPIO pins on press and release as well as using the binary manually.

Here is my full history in case there are any clues:

`
pi@raspberrypi:~ $ history

1  sudo nano /etc/wpa_supplicant/wpa_supplicant.conf 

2  sudo apt-get install mumble-server

3  sudo -i

4  su mumble

5  su -i

6  su

7  sudo -i

8  clear

9  ls

10 sudo -i

11 sudo restart

12 sudo reboot

13 dmesg

14 sudo -i

15 ls

16 sudo reboot

17 history

pi@raspberrypi:~ $ sudo -i

root@raspberrypi:~# history

1  adduser --disabled-password --disabled-login --gecos "" mumble

2  usermod -a -G cdrom,audio,video,plugdev,users,dialout,dip,input,gpio,mumble

3  usermod -a -G cdrom,audio,video,plugdev,users,dialout,dip,input,gpio mumble

4  apt-get install golang libopenal-dev libopus-dev git

5  su mumble

6  su -i

7  cp /home/mumble/gocode/src/github.com/dchote/talkiepi/conf/systemd/mumble.service 

/etc/systemd/system/mumble.service

8  systemctl enable mumble.service

9  su mumble

10 cd /etc/systemd/system/

11 ls

12 nano mumble.service

13 systemctl daemon-reload

14 service mumble restart

15 nano mumble.service

16 systemctl daemon-reload

17 service mumble restart

18 ls

19 exit

20 su mumble

21 su mumble

22 clear

23 ls

24 exit

25 aplay -l

26 defaults.ctl.card 1

27 nano /usr/share/alsa/alsa.conf

28 sudo reboot

29 history

root@raspberrypi:~# su mumble

mumble@raspberrypi:/root $ history

1  mkdir ~/gocode

2  mkdir ~/bin

3  export GOPATH=/home/mumble/gocode

4  export GOBIN=/home/mumble/bin/

5  cd $GOPATH

6  go get github.com/dchote/gopus

7  go get github.com/dchote/talkiepi

8  cd $GOPATH/src/github.com/dchote/talkiepi

9  go build -o /home/mumble/bin/talkiepie cmd/talkiepie/main.go

10 go build -o /home/mumble/bin/talkiepi cmd/talkiepi/main.go

11 su -i

12 exit

13 cd ~

14 openssl genrsa -aes256 -out key.pem

15 openssl req -new -x509 -key key.pem -out cert.pem -days 1095

16 openssl rsa -in key.pem -out nopasskey.pem

17 cat nopasskey.pem cert.pem > mumble.pem

18 exit

19 ls

20 cd ~

21 ls

22 cd gocode/

23 ls

24 cd pkg

25 ls

26 cd ../

27 ls

28 cd src

29 ls

30 cd github.com/

31 ls

32 cd kennygrant/

33 ls

34 cd ../

35 ls

36 cd stianeikeland/

37 ls

38 cd go-rpio/

39 ls

40 exit

41 ls

42 cd /

43 cd ~

44 ls

45 cd gocode/

46 ls

47 cd pkg

48 ls

49 cd ..

50 cd src

51 ls

52 cd github.com/

53 ls

54 cd dchote/

55 ls

56 cd gpio/

57 ls

58 more README.md

59 ls

60 cd ~/

61 ls

62 find talkiepi.go ~/

63 cd /home/mumble/bin

64 ls

65 more talkiepi

66 find talkiepi.go ~/ | grep talkiepi.go

67 cd /home/mumble/gocode/src/github.com/dchote/talkiepi/

68 ls

69 more talkiepi.go q

70 nano talkiepi.go

71 gpio readall

72 raspi-gpio get

73 tail -f /var/log/messages

74 sudo tail -f /var/log/messages

75 exit

76 history

mumble@raspberrypi:/root $
`

Multiple instance

Hi,

It is possibile to run it for more than two devices with more buttons?
Example: three devices each one with two buttons.
If it's possible please describe how to change configuration.

how to use sub or child channels

Hello,
I would like talkiepi on my raspberry pi's to be added to a sub or child channel on connection.
Something like house/room#.
I found this closed issue
Fix for Child Channels in client.go #2
It seems the ability is there, but I can't figure out the syntax.
I have tried
-channel child-channel (not changing the syntax from before I created and moved the channel to a subchannel)
-channel main-channel/child-channel
-channel /main-channel/child-channel
-channel main-channel.child-channel
-channel /main-channel.child-channel
this is been added to the /etc/systemd/system/mumble.service
running systemctl daemon-reload
and service mumble restart after each change.

I looked at
https://github.com/dchote/talkiepi/blob/master/cmd/talkiepi/main.go
but was not able to see anything about sub channels.

I can have mumble on the pi's be auto assigned on connection correctly if I don't use sub/child/nested channels.
Any help would be appreciated.
Thanks

rpi4 b 4gb ram
rpi 3a+

Distributor ID: Raspbian
Description: Raspbian GNU/Linux 11 (bullseye)
Release: 11
Codename: bullseye

Intermittent Connectivity

Full install went perfectly, I'm connected to my personal mumble server but when I push the PTT, my connection window on my phone shows the pi intermittently transmitting. I've used my server between phones before, I've tested audio from my phone to the pi, but for some reason, the other direction isn't working.

install issue go version 1.7 ERROR: package math/bits

Hi i have gone true the install guide and all is well until -----go get github.com/dchote/talkiepi-----

I get this error----
package math/bits: unrecognized import path "math/bits" (import path does not begin with hostname)

The version of go is version go1.7.4 linux/arm

Iv been at this for days can anyone help please thanks

[Question] still receive song when ptt is pressed ?

Hello,

I'm looking for something similar or maybe exactly this project but I want to be sure before buying more raspberry pis and spending time on it :)

Simple question :

When someone press the button on his side, does he still receive the voice from other side ? Or pressing button turns off speaker (like on analogic Talki-walki)?

(My need is to still have speaker working)

Thanks in advance for your reply

Regards

Spilz

RPi Zero workaround not working

I'm trying to run TalkiePi on RPi Zero (Mumble server is also running on this RPi); everything from installation manual went smooth except workaround for RPi Zero.

I'm getting:

root@pizero2:/home/pi/talkiepi/workarounds# dpkg -i *deb
(Reading database ... 105193 files and directories currently installed.)
Preparing to unpack libopenal1_1.17.2-4_armhf.deb ...
Unpacking libopenal1:armhf (1:1.17.2-4) over (1:1.17.2-4) ...
Preparing to unpack libopenal1-dbg_1.17.2-4_armhf.deb ...
Unpacking libopenal1-dbg:armhf (1:1.17.2-4) over (1:1.17.2-4) ...
Preparing to unpack libopenal-data_1.17.2-4_all.deb ...
Unpacking libopenal-data (1:1.17.2-4) over (1:1.17.2-4) ...
Preparing to unpack libopenal-dev_1.17.2-4_armhf.deb ...
Unpacking libopenal-dev:armhf (1:1.17.2-4) over (1:1.17.2-4) ...
dpkg: dependency problems prevent configuration of libopenal1:armhf:
 libopenal1:armhf depends on libsndio6.1 (>= 1.1.0); however:
  Package libsndio6.1 is not installed.

dpkg: error processing package libopenal1:armhf (--install):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of libopenal1-dbg:armhf:
 libopenal1-dbg:armhf depends on libopenal1 (= 1:1.17.2-4); however:
  Package libopenal1:armhf is not configured yet.

dpkg: error processing package libopenal1-dbg:armhf (--install):
 dependency problems - leaving unconfigured
Setting up libopenal-data (1:1.17.2-4) ...
dpkg: dependency problems prevent configuration of libopenal-dev:armhf:
 libopenal-dev:armhf depends on libopenal1 (= 1:1.17.2-4); however:
  Package libopenal1:armhf is not configured yet.

dpkg: error processing package libopenal-dev:armhf (--install):
 dependency problems - leaving unconfigured
Processing triggers for libc-bin (2.28-10+rpi1) ...
Errors were encountered while processing:
 libopenal1:armhf
 libopenal1-dbg:armhf
 libopenal-dev:armhf

I'm on latest RaspberryPi OS (Raspbian), installed yesterday. Already did apt-get update & apt-get upgrade
Any suggestions? I'm not a Linux expert, so could you please ask me for additional info with some commands examples? Thanks!

mumble password ??

hello

sorry for my stupid question, but i don't find the solution
i'm trying to install talkiepi, following guide, but at step "Start on boot", it ask me a password for user mumble but I dont find it :(

I thought that creating user mumble with adduser --disabled-password --disabled-login --gecos "" mumble will create a user without password, doesn't it ?

can you help me ?
thaks for your help

regards

Need mumble superuser password to install workarounds?

Hello,
I am trying to install the code on a pi zero w and thus tried to use the packages in the workarounds directory.
The instructions suggest to install by navigating to cd talkiepi/workarounds and then dpkg -i *.deb.
Doing so I get an error message saying dpkg requires superuser privilege. Trying sudo -i from mumble@raspberrypi gives a 3 try prompt for the sudo password for mumble, which is unknown to me. Googling a bit I saw that it should be listed somewhere in a logfile, but I cant find that file. Any suggestions?

Alternatively trying "apt-get install libopenal1" in the root directory seems to give the message that libopenal1 is already installed.

Waveshare WM8960 Audio HAT

If you're using the Waveshare WM8960 Audio HAT, please take these notes into consideration:

  • you have no LEDs and the default LED assignments are conflicting with some I2S signals
  • the button is on different GPIO

So please use this configuration:

const (
//	no LEDs on this board, these GPIOs are free to use
//      don't use GPIO18 with this board
	OnlineLEDPin       uint = 22
	ParticipantsLEDPin uint = 23
	TransmitLEDPin     uint = 24
//	This is the correct GPIO for the button
	ButtonPin          uint = 17
)

Maybe take into consideration the possibility to not use the LEDs in code.

Also: thanks for talkiepi, it's awesome.

No microphone with "seed-2mic-voicecard"

I (thought) I'd have a pretty easy setup: One Audio device.
A seed-2mic-voicecard on a rasperry zero 2w with the latest RasperryPi OS.

Recording with arecord and playing with aplay works fine without any device configuration

arecord -d 10 -f cd -t wav foobar.wav
aplay foobar.wav

Talkiepi plays the incoming stream from mumble but does not send anything.
I can see no error message or anything wrong here.

Any idea what could be wrong or where I can look at?

Thanks a lot!

aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: seeed2micvoicec [seeed-2mic-voicecard], device 0: bcm2835-i2s-wm8960-hifi wm8960-hifi-0 [bcm2835-i2s-wm8960-hifi wm8960-hifi-0]
Subdevices: 0/1
Subdevice #0: subdevice #0
and

arecord -l
**** List of CAPTURE Hardware Devices ****
card 0: seeed2micvoicec [seeed-2mic-voicecard], device 0: bcm2835-i2s-wm8960-hifi wm8960-hifi-0 [bcm2835-i2s-wm8960-hifi wm8960-hifi-0]
Subdevices: 0/1
Subdevice #0: subdevice #0

No Sound Input

I am using a USB Microphone and a separate USB Speaker.

For the life of me I can't get the input to work.

I can call arecord -d 10 test.wav and my microphone records the 10 seconds fine.
I can call aplay test.wav and my speaker plays the file fine.

Notice that in neither command I specify the hw.

With talkiepi I get this error: ALSA lib pcm_dsnoop.c:618:(snd_pcm_dsnoop_open) unable to open slave

I'm using a Zero-W.

When I run talkiepi I can receive the input, it's very distorted - which is fine for now, but no matter what, I even made a new fork to remove gpios from the equation (https://github.com/savvamadar/talkiepi), I can't get input. The pi's lips do not light up in the mumble server. Could you take a look at my repo?

Run it via talkiepi -server whatever -username blah -insecure -voiceon

My .asourdrc looks like this:
pcm.!default { type asym playback.pcm { type plug slave { pcm "hw:0,0" } } capture.pcm { type plug slave { pcm "hw:1,0" } } }

PTT button not functioning as described

Installation and configuration went off without a hitch, online and participant LEDs work. I can receive no problem.

I can manually trigger the transmit LED so I know it's wired correctly and connected to the correct pin number, but closing a circuit with a button from pin 25 (the button pin) to ground does not have any effect on the software nor the LED.

GPIO.25 is set as an input pin, as I believe it has to be for rpio to use it in a pull-up capacity.

Any tips?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.