Giter Site home page Giter Site logo

aikashka's Introduction

Aikashka

Talk with GPT 3.5 model right in Discord. Powered by OpenAI's Whisper & GPT.

How it works

Well, your voice is sent to the local Whisper backend to get text which adds to the room context.

Aikashka will respond every 10-40 seconds or by calling her(/him) by name.

When the time comes, a big prompt is being sent to the OpenAI's GPT endpoint. The answer will be strictly formatted. Depending on the response, Aikashka can:

  • say something
  • write something in the text channel
  • kick someone from the voice channel
  • save some note for herself
  • leave the channel

Note that she remembers only 20 last user messages and 6 her own responses, all in order.

Setup

Notes

I don't do pre-made binary. It means that you have to clone this repo, open it in JetBrains Rider / Fleet (or Visual Studio (/Code) if you don't respect yourself) and make some changes on your own.

TTS made using Tinkoff VoiceKit (well, it's really cheap and the voice is REALLY good).

How To

Required

Rename appsettings.example.json to appsettings.json and fill all required API keys.

Rename name_mappings.example.txt to name_mappings.txt and map all user profiles that will talk with the bot.

Lore

Take a look at systemMsg in Aikashka.Core/Generators/TextGenerator.cs - first 3 lines. Change them if you want.

Whisper backend (aikashka-backend/)

Create virtual environment & install requirements.txt.

If you want GPU acceleration, install PyTorch with CUDA, e.g. pip install torch --index-url https://download.pytorch.org/whl/cu117

And if you don't, then remove , device=0 from core.py

Also ensure that model fits your needs.

Run

Compile & run bot.

Invite bot to the server and use /go command to join the voice channel.

Commands

  • /go: forces bot to join the channel.
  • /cum: send message to the room context. useful if you can't spell properly some words
  • /state: shows room context.
  • /clear: clear room context.

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.