-
Notifications
You must be signed in to change notification settings - Fork 0
/
README
38 lines (24 loc) · 783 Bytes
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
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