telegram-voice-chatgpt-bot
Описание
Telegram bot for voice communication with ChatGPT.
Языки
JavaScript
Voice ChatGPT telegram bot
About: 1
Telegram bot for voice communication with ChatGPT. The user sends a voice or text message to the bot and receives a text or voice message in response from ChatGPT. It is written in JavaScript and uses NodeJS.
Features: 2
- The ability to choose a service for converting voice to text: using
orOpenAI APIYandexSpeechKit API - Converting
: using.mp3 to text
.OpenAI API - Converting
: using.ogg to textYandexSpeechKit API - Converting
: using.ogg to .mp3
.fluent-ffmpeg - The user can choose how best to get an answer: by
, bytext
, or all together.voice - To convert text to voice message: using
orYandexSpeechKit APIGoogle - ChatGPT remembers the context
- Whitelist of users who have access to the bot.
- Collecting simple statistics that includes the total number of requests, the number of voice requests, the number of text requests, the total number of words in all requests.
- The ability for users to see their statistics.
- Voice messages and text history chat are not saved on the server if the corresponding option is enabled
- The database is not used, all statistics and data are stored in
format..json
⚠️ If the bot work with a large audience, it is better to use a database.
Installation: 3
$ git clone https://github.com/Hashmann/telegram-voice-chatgpt-bot.git
$ cd server
- Edit .env.production
and set your telegram bot token and OpenAI key..env.development - Edit
and add the usernames to the whitelist.whitelist.user.json
$ npm install
⚠️ Do not delete directories:
and
audio
log
Usage: 4
Development
$ npm run start:dev
Production
$ npm run start
Dependencies: 5
Development
- Nodemon ^2.0.20
Production
- Dotenv (npm) ^16.0.3