A basic automation program written in go-lang using whatsmeow library along with open-ai's CHAT-GPT and ElevenLabs AI TTS.
Report Bug
·
Request Feature
Table of Contents
- Send Text Messages
- Send Text Message as Reply
- Send Audio Message as Reply
- Persist OpenAI Chat Context
- Jailbreak GPT
- Custom Personality
-> One must remember, this chat bot remembers context in a streamlined manner, meaning even if you use this in a group, different messages by different user will be treated as multiple messages from same user.
These instructions are mainly written with Linux based operating system in mind. However these requirements shouldn't differ a lot. Feel free to ask any query.
- Go Lang Read Installation Guide
- Verify the installation by typing the following command in your console:
go version
- Install Ffmpeg: Download Page
- Install libopus-dev Download Page
I won't ask that why you are using windows for these kind of things?, but let's go the easier way!
- Install Windows Subsystem for Linux Installation Guide
- Install go in Windows Subsystem for Linux
- Install Ffmpeg in Windows Subsystem for Linux
- Install libopus-dev in Windows Subsystem for Linux
- Follow the below Installation instruction in Windows Subsystem for Linux (WSL)
- After this while creating
.env
file, forAUDIO_FOLDER_ABSOLUTE_PATH="/home/<username>/whatsapp-botto-go/audio/"
, make sure to OMIT//wsl.localhost/<your os name, for ex. Ubuntu>/
part.
- Clone the repo
git clone https://github.com/SomnathDas/whatsapp-botto-go.git
- Install required GO packages by typing following commands
cd whatsapp-botto-go
go get
- Create
.env
file in root dir of the project and enter the following in.env
file
OPEN_AI_CHATGPT_API_KEY=""
ELEVEN_LABS_TTS_API_KEY=""
ELEVEN_LABS_VOICE_ID=""
ELEVEN_LABS_MODEL_ID="eleven_monolingual_v1"
WHATSAPP_NUMBER=""
AUDIO_FOLDER_ABSOLUTE_PATH=""
- OPEN_AI_CHATGPT_API_KEY : OpenAI Website -> Personal -> View API Keys
- ELEVEN_LABS_TTS_API_KEY : Elevenlabs Website -> Profile -> API Key
- ELEVEN_LABS_VOICE_ID : Pick your voice model
- WHATSAPP_NUMBER : Example:= 9196XXXXXXXX for India, where 91 is the country code
- AUDIO_FOLDER_ABSOLUTE_PATH : For example in Linux :=
"/home/somnath/whatsapp-botto-go/audio/"
- MY PREFFERED VOICE MODEL "BELLA" : ELEVEN_LABS_VOICE_ID="EXAVITQu4vr4xnSDxMaL"
- Run the app by typing the following command in root directory of this project
go run *.go
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Distributed under the GNU Affero General Public License v3.0 License. See LICENSE.txt
for more information.
Somnath Das - @instagram_handle
Project Link: https://github.com/SomnathDas/whatsapp-botto-go
I whole heartedly thank these amazing men/women for their time and effort.