Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/williamwa/mssmith

A Telegram bot that utilizes the ChatGPT API and can communicate through voice.
https://github.com/williamwa/mssmith

chatpgt-api telegram-bot tts whisper

Last synced: 23 days ago
JSON representation

A Telegram bot that utilizes the ChatGPT API and can communicate through voice.

Awesome Lists containing this project

README

        

This project is a telegram bot which can talk with you.

- Using gpt-3.5-turbo api
- Using whisper api to convert audio to text
- Using azure text to speech api to convert text to audio

Deploy:

Step 1: Get API keys:

- Create a Telegram bot and get the token
- Get OpenAI API key
- Create Azure Cognitive Service -> Speech Service, get API key and region

Step 2: Run bot webhook service:

- create a .env file with following content:

```
BOT_TOKEN=xxxxxx

DOMAIN=a web domain for telegram web hook
PORT=443

OPENAI_API_KEY=sk-xxxxx

SPEECH_KEY=xxxxx
SPEECH_REGION=yourreagion
```

- npm install
- node index.js

Step 3: Set webhook for your bot:

- send a reuqest to following url to set webhook:

https://api.telegram.org/bot{BOT_TIKEN}/setWebhook?url=https://{DOMAIN}/telegram