Giter Site home page Giter Site logo

nrl-ai / customchar Goto Github PK

View Code? Open in Web Editor NEW
73.0 5.0 9.0 14.64 MB

Your customized AI assistant - Personal assistants on any hardware! With llama.cpp, whisper.cpp, ggml, LLaMA-v2.

Home Page: https://docs.customchar.com

CMake 0.07% C++ 86.14% Shell 0.05% C 10.68% Objective-C++ 1.09% GLSL 0.01% Objective-C 0.10% Metal 1.87%
cpp llama-cpp llm stt tts whisper-cpp ggml llama llama-v2

customchar's Introduction

CustomChar - Your customized AI characters

Your customized AI characters - personal assistants on any hardware! This project aims to be a framework to enable the creation of AI characters that can be used in games, simulations, virtual assistants, and other applications without depending on specific platforms, cloud services, or specialized hardware.

Some of the applications you can build with CustomChar:

  • Game characters that can talk to you and interact with you.
  • Your customized virtual assistant. Think about a JARVIS version on your computer.
  • Online education experience with virtual friends/teachers.
  • Cloud services that enable users to create their own virtual characters.

Our very early experiment with CustomChar

CustomChar.-.Experiment.05.2023-07-30._.Record.a.video.mp4

Think about your own JARVIS assistant that you can have totally inside your laptop...

Iron.Man.mp4

Note: This project is still in the early stage of development. We are working hard to make it available as soon as possible. Star this project ๐ŸŒŸ๐ŸŒŸ๐ŸŒŸ to follow our progress and encourage us to make it happen.

1. Architecture

CustomChar Architecture

2. Updates

  • ๐Ÿ”ฅ 2023-08-06: Load character configuration from a file.
  • ๐Ÿ”ฅ 2023-07-30: Record a video with "record a video" and "stop recording".
  • ๐Ÿ”ฅ 2023-07-30: Added OpenCV + camera view.
  • ๐Ÿ”ฅ 2023-07-29: Added a plugin executor to open apps.
  • ๐Ÿ”ฅ 2023-07-25: Added UI with Dear ImGui.
  • ๐Ÿ”ฅ 2023-07-23: Documentation website is online at https://docs.customchar.com.
  • ๐Ÿ”ฅ 2023-07-22: Voice chat with your Llama-V2 model. TTS is supported on MacOS only.

3. Features

  • Build AI characters from the knowledge database ๐Ÿ’ฌ๐Ÿ’ฌ๐Ÿ’ฌ :
    • LLamaCpp for LLM. Chat with Llama-V2 on all platforms.
    • Knowledge indexing and searching (EmbedDB + SQLite).
    • Search knowledge DB to add into prompt.
  • Talk to your character ๐ŸŽค๐ŸŽค๐ŸŽค :
    • STT with whisper.cpp. Now supports speech recognition on all platforms.
  • Hear from your character ๐Ÿ”Š๐Ÿ”Š๐Ÿ”Š :
    • TTS with "say" on MacOS. Note: "say" is not available on other platforms (Windows, Linux)
    • TTS with bark.cpp. Expected to be available on all platforms.
  • Plugin executor:
    • Open apps
    • Record video
  • Perception engine to see the world through the camera ๐Ÿ“ท๐Ÿ“ท๐Ÿ“ท"
    • Support video capturing
    • Object detection
  • Add GUIs for the character interaction.
    • Dear ImgUI
    • Web-based GUI
  • Add a GUI for the character creation.
  • Create virtual characters that can be used in games, simulations, and other applications.
    • Iron Man (WIP)
    • Batman
    • Superman
  • Add bindings to other languages:
    • Python
    • C# (Unity)
    • Javascript (On-browser)

4. Build

Clone the repository:

git clone https://github.com/nrl-ai/CustomChar --recursive
cd CustomChar

Install dependencies:

On macOS: Using Homebrew

brew install sdl2 glew glfw3
brew install opencv
brew install ffmpeg # For video recording

On Ubuntu:

sudo apt-get install libsdl2-dev libglew-dev libglfw3-dev
sudo apt-get install libopencv-dev
sudo apt-get install ffmpeg # For video recording

On Windows: Using vcpkg, Git Bash, and FFmpeg.

vcpkg install sdl2:x64-windows glew:x64-windows glfw3:x64-windows
vcpkg install opencv[contrib,nonfree,ffmpeg,ipp]:x64-windows --recurse

Build the CustomChar executable:

mkdir build
cd build
cmake ..
make

5. Usage

Download the models before running the program:

bash scripts/download-models.sh

Run the program:

./customchar

6. Build documentation

  • Step 1: Install doxygen first.

  • Step 2: Build the documentation:

doxygen Doxyfile.in
  • Step 3: Deploy html documentation from docs/_build/html.

  • Step 4: Our latest documentation is deployed at https://docs.customchar.com.

7. Contribution

We welcome all contributions to this project.

  • For coding style, please follow the style of the existing code.
  • Install clang-format for auto formatting the code.
  • Install pre-commit for the auto-formatting hook or manually run the script scripts/format-code.sh to format the code.
pre-commit install # Install pre-commit hook
bash scripts/format-code.sh # Format code (C++ styling)

8. Star history

Star History Chart

9. References

customchar's People

Contributors

haok61bkhn avatar vietanhdev avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

customchar's Issues

Unable to install OpenCV

Tried to follow the steps but facing an error on OpenCV using brew.
I managed to make build opencv locally, Any chance to point to it?

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.