Coder Social home page Coder Social logo

ai-girlfriend-with-voice-telegram-bot's Introduction

AI-Girlfriend Bot ๐Ÿค–โค๏ธ

AI-Girlfriend Bot is a simple application based on OpenAI GPT-4 that simulates a conversation with an AI-powered virtual girlfriend. This is a simpler reproduction of the famous (and somewhat creepy) AI Girlfriend featured on Fortune.

Features ๐ŸŒŸ

  • ๐Ÿงก Pretends to be your girlfriend
  • ๐Ÿ“› Knows your name
  • ๐ŸŽ™๏ธ Accepts text or audio input
  • ๐Ÿ”ˆ Replies with audio messages
  • ๐Ÿ’ณ Supports payments through Stripe ($1/min)

Quick Start ๐Ÿš€

Prerequisites

  • Python 3
  • A Telegram bot token
  • A MongoDB database
  • API keys from OpenAI, ElevenLabs, MongoDB, and Stripe

Setup & Running

  1. Clone the repository:
  2. Navigate to the cloned directory and install the required Python packages: pip install -r requirements.txt
  3. Create a Telegram bot and obtain the bot token.
  4. Set up a MongoDB database (you can use the free tier). Name it as you wish and create two collections: users, and message_history. Ensure network access is enabled for all IPs.
  5. Obtain API keys from OpenAI, ElevenLabs, MongoDB, and Stripe (for testing) and write them in a .env file that you create.
  6. Run the bot: python3 telegram_bot.py

How it Works ๐Ÿ› ๏ธ

  1. Payment & Registration: Users need to make a payment to interact with the bot. Upon payment, the user gets registered as a customer in the database with an expiration time.

  2. Conversing with the Bot: When a user sends a message, a language model from OpenAI responds as the virtual girlfriend.

  3. Saving the Conversation: The user's message and the model's response are saved in the MongoDB database and can be used as chat history for subsequent messages.

  4. Text-to-Speech Conversion: The model's response is converted into audio using Eleven Labs' text-to-speech service.

  5. Sending Audio Response: The audio is sent to the user as a response through Telegram.

Contributing ๐Ÿค

We welcome contributions!

Acknowledgements ๐Ÿ™

  • OpenAI for GPT-4
  • Eleven Labs for text-to-speech service
  • Telegram for messaging platform
  • MongoDB for database services
  • Stripe for payment services

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.