• Stars
    star
    439
  • Rank 99,247 (Top 2 %)
  • Language
    Python
  • License
    MIT License
  • Created 10 months ago
  • Updated 6 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

BUD-E: A conversational and empathic AI Voice Assistant

BUD-E (Buddy for Understanding and Digital Empathy) is an open-source AI voice assistant which aims for the following goals:

  1. replies to user requests in real-time
  2. uses natural voices, empathy & emotional intelligence
  3. works with long-term context of previous conversations
  4. handles multi-speaker conversations with interruptions, affirmations and thinking pauses
  5. runs fully local, on consumer hardware.

This project is a collaboration between LAION, the ELLIS Institute Tübingen, Collabora and the Tübingen AI Center.

Image 1 Image 2 Image 3 Image 4

This demo shows an interaction with the current version of BUD-E on an NVIDIA RTX 4090. With this setup, the voice assistant answers with a latency of 300 to 500 milliseconds.

Quick Start

  1. Clone this repository and follow the installation guide in the readme.
  2. Start the voice assistant by running the main.py file in the repository root.
  3. Wait until "Listening.." is printed to the console and start speaking.

Roadmap

Altough the conversations with the current version of BUD-E already feel quite natural, there are still a lot of components and features missing what we need to tackle on the way to a truly and naturally feeling voice assistant. The immediate open work packages we'd like to tackle are as follows:

Reducing Latency & minimizing systems requirements

  • Quantization. Implement more sophisticated quantization techniques to reduce VRAM requirements and reduce latency.
  • Fine-tuning streaming TTS. TTS systems normally consume full sentences to have enough context for responses. To enable high-quality low-latency streaming we give the TTS context from hidden layers of the LLM and then fine-tune the streaming model on a high-quality teacher (following https://arxiv.org/abs/2309.11210).
  • Fine-tuning streaming STT. Connect hidden layers from STT and LLM system and then fine-tune on voice tasks to maximize accuracy in low-latency configurations of STT model.
  • End-of-Speech detection. Train and implement a light-weight end-of-speech detection model.
  • Implement Speculative Decoding. Implement speculative decoding to increase inference speed in particular for the STT and LLM models.

Increasing Naturalness of Speech and Responses

  • Dataset of natural human dialogues. Build a dataset (e.g., Youtube, Mediathek, etc.) with recorded dialogues between two or more humans for fine-tuning BUD-E.
  • Reliable speaker-diarization. Develop a reliable speaker-diarization system that can separate speakers, including utterances and affirmations that might overlap between speakers.
  • Fine-tune on dialogues. Finetune STT -> LLM -> TTS pipeline on natural human dialogues to allow the model to respond similarly to humans, including interruptions and utterances.

Keeping track of conversations over days, months and years

  • Retrieval Augmented Generation (RAG). Implement RAG to extend knowledge of BUD-E, unlocking strong performance gains (cp. https://www.pinecone.io/blog/rag-study/).
  • Conversation Memory. Enable model to save information from previous conversations in vector database to keep track of previous conversations.

Enhancing functionality and ability of voice assistant

  • Tool use. Implement tool use into LLM and the framework, e.g., to allow the agent to perform internet searches

Enhancing multi-modal and emotional context understanding

  • Incorporate visual input. Use a light-weight but effective vision encoder (e.g., CLIP or a Captioning Model) to incorporate static image and/or video input.
  • Continuous vision-audio responses. Similar to the (not genuine) Gemini demo it would be great if BUD-E would naturally and continuously take into account audio and vision inputs and flexibly respond in a natural manner just like humans.
  • Evaluate user emotions. Capture webcam images from the user to determine the user’s emotional state and incorporate this in the response. This could be an extension of training on dialogues from video platforms, using training samples where the speaker’s face is well visible.

Building a UI, CI and easy packaging infrastructure

  • LLamaFile. Allow easy cross-platform installation and deployment through a single-file distribution mechanism like Mozilla’s LLamaFile.
  • Animated Avatar. Add a speaking and naturally articulating avatar similar to Meta’s Audio2Photoreal but using simpler avatars using 3DGS-Avatar [https://neuralbodies.github.io/3DGS-Avatar/].
  • User Interface. Capture the conversation in writing in a chat-based interface and ideally include ways to capture user feedback.
  • Minimize Dependencies. Minimize the amount of third-party dependencies.
  • Cross-Platform Support. Enable usage on Linux, MacOS and Windows.
  • Continuous Integration. Build continuous integration pipeline with cross-platform speed tests and standardized testing scenarios to track development progress.

Extending to multi-language and multi-speaker

  • Extend streaming STT to more languages. Extending to more languages, including low-resource ones, would be crucial.
  • Multi-speaker. The baseline currently expects only a single speaker, which should be extended towards multi-speaker environments and consistent re-identification of speakers.

Installation

The current version of BUD-E contains the following pretrained models:

The model weights are downloaded and cached automatically when running the inference script for the first time.

To install BUD-E on your system follow these steps:

1) Setup Environment and Clone the Repo

We recommend to create a fresh conda environment with python 3.10.12.

conda create --name bud_e python==3.10.12
conda activate bud_e

Next, clone this repository. Make sure to pass the -recurse-submodules argument to clone the required submodules as well.

git clone --recurse-submodules https://github.com/LAION-AI/natural_voice_assistant.git

2) Install espeak-ng

Ubuntu:

sudo apt-get install festival espeak-ng mbrola 

Windows:

conda env config vars set PHONEMIZER_ESPEAK_LIBRARY="C:\Program Files\eSpeak NG\libespeak-ng.dll"
  • Reactivate your conda environment

3) Install pytorch

Install torch and torchaudio using the configurator on https://pytorch.org/

4) Install Required Python Packages

Inside the repository run:

pip install -r requirements.txt

On Ubuntu, you might install portaudio which is required by pyaudio. If you encounter any errors with pyaudio, try to run:

sudo apt install portaudio19-dev

5) Start your AI conversation

  • Start BUD-E by running the main.py file inside the repository:
python main.py
  • Wait until all checkpoints are downloaded and all models are initialized. When "## Listening..." is prompted to the console, you can start speaking.

  • When starting the main.py a list of available audio devices is displayed in the terminal. By default the device with index 0 is used for recording. To select a specific audio device, you can use the --audio-device-idx argument and pass the device index you want to use.

Command-Line Arguments

Below are the available command-line arguments for starting the assistant:

Argument Description Default Value
--audio-device-idx Select the audio device by index that should be used for recording. If no device idex is selected, the default audio device will be used. None
--audio-details Show details for the selcted audio device like the sample rate or number of audio channels. false
--tts-model Select the model that should be used for text to speech. You can choose between StyleTTS2 and WhisperSpeech. Please note that WhisperSpeech relies on torch.compile which is not supported on windows. You can still use WhisperSpeech on Windows but the TTS inference will be very slow. StyleTTS2

Troubleshooting

OSError: [Errno -9999] Unanticipated host error

This error could occur, if access to your audio device is denied. Please check your local settings and allow desktop apps to access the microphone.

OSError "invalid samplerate" or "invalid number of channels"

These are pyaudio related issues that occur if the selected audio device does not support the current sample rate or number of channels. Sample rate and channels are selected automatically regarding the current audio-device index that is used. If you encounter any problems related to pyaudio, use the --audio-device-idx argument and try a different device id. A list of all available audio-devices is printed when executing main.py.

Collaborating to Build the Future of Conversational AI

The development of BUD-E is an ongoing process that requires the collective effort of a diverse community. We invite open-source developers, researchers, and enthusiasts to join us in refining BUD-E's individual modules and contributing to its growth. Together, we can create an AI voice assistants that engage with us in natural, intuitive, and empathetic conversations.

If you're interested in contributing to this project, join our Discord community or reach out to us at [email protected].

More Repositories

1

Open-Assistant

OpenAssistant is a chat-based assistant that understands tasks, can interact with third-party systems, and retrieve information dynamically to do so.
Python
37,011
star
2

audio-dataset

Audio Dataset for training CLAP and other models
Python
616
star
3

CLIP_benchmark

CLIP-like model evaluation
Jupyter Notebook
601
star
4

dalle2-laion

Pretrained Dalle2 from laion
Python
499
star
5

CLAP

Contrastive Language-Audio Pretraining
Python
479
star
6

laion-3d

Collect large 3d dataset and build models
253
star
7

phenaki

A phenaki reproduction using pytorch.
Python
218
star
8

aesthetic-predictor

A linear estimator on top of clip to predict the aesthetic quality of pictures
Jupyter Notebook
199
star
9

Open-Instruction-Generalist

Open Instruction Generalist is an assistant trained on massive synthetic instructions to perform many millions of tasks
Python
195
star
10

ldm-finetune

Home of `erlich` and `ongo`. Finetune latent-diffusion/glid-3-xl text2image on your own data.
Python
169
star
11

scaling-laws-openclip

Reproducible scaling laws for contrastive language-image learning (https://arxiv.org/abs/2212.07143)
Jupyter Notebook
152
star
12

CLIP-based-NSFW-Detector

Python
135
star
13

laion-datasets

Description and pointers of laion datasets
HTML
131
star
14

laion-dreams

Aim for the moon. If you miss, you may hit a star.
121
star
15

laion.ai

HTML
110
star
16

AIW

Alice in Wonderland code base for experiments and raw experiments data
Python
108
star
17

LAION-5B-WatermarkDetection

Python
102
star
18

video-clip

Let's make a video clip
92
star
19

Open-GIA

O-GIA is an umbrella for research, infrastructure and projects ecosystem that should provide open source, reproducible datasets, models, applications & safety tools for Open Generalist Interactive Agents (O-GIA). O-GIA systems will act in collaboration with human or autonomously, supporting various kind of validated decision making and assistance.
91
star
20

General-GPT

Jupyter Notebook
64
star
21

Discord-Scrapers

Implementation of a discord channel scraper to generate datasets.
Python
60
star
22

Text-to-speech

Python
58
star
23

Big-Interleaved-Dataset

Big-Interleaved-Dataset
Python
57
star
24

riverbed

Tools for content datamining and NLP at scale
Python
41
star
25

OCR-ensemble

Jupyter Notebook
38
star
26

Conditional-Pretraining-of-Large-Language-Models

Python
37
star
27

interesting-text-datasets

33
star
28

blade2blade

Adversarial Training and SFT for Bot Safety Models
Python
32
star
29

temporal-embedding-aggregation

Aggregating embeddings over time
Python
31
star
30

deep-image-diffusion-prior

Inverts CLIP text embeds to image embeds and visualizes with deep-image-prior.
Jupyter Notebook
31
star
31

watermark-detection

A repository containing datasets and tools to train a watermark classifier.
Python
31
star
32

medical

This repository will be a summary and outlook on all our open, medical, AI advancements.
Jupyter Notebook
28
star
33

Anh

Anh - LAION's multilingual assistant datasets and models
Python
27
star
34

laion50BU

Un-*** 50 billions multimodality dataset
24
star
35

conditioned-prior

(wip) Use LAION-AI's CLIP "conditoned prior" to generate CLIP image embeds from CLIP text embeds.
Python
18
star
36

LAION-SAFETY

An open toolbox for NSFW & toxicity detection
Jupyter Notebook
16
star
37

opendream

Frontend (and soon also midleware and backend) for a new, opensource image generation platform.
TypeScript
14
star
38

laion5B-paper

Building the laion5B paper
13
star
39

laion-dedup

Python
13
star
40

notebooks

A collection of generative and training notebooks getting mirrored to google colab.
Jupyter Notebook
12
star
41

laionide

This repository contains training code and checkpoitns for finetuning glide.
Python
12
star
42

super-resolution

This is the LAION repository for creating open super-resolution models with the help of LAION-5B subsets.
11
star
43

dataset-spec

Describe the format of image/text datasets
Python
10
star
44

LAION-PEOPLE

This project provides a data set with bounding boxes, body poses, 3D face meshes & captions of people from our LAION-2.2B. Additionally it provides clusters based on the poses and face meshes and pose-related captions based on these cluster assignments.
10
star
45

image-deduplication-testset

HTML
8
star
46

project-menu

Projects at LAION
8
star
47

laion-ai.github.io

laion github website
Svelte
6
star
48

dataset-usage

This repository is a summary of all systems and scientific papers that use LAION datasets.
6
star
49

repository-overview

This repository will give a quick overview of all projects and repositories from LAION.
5
star
50

LionizeR

Experiments with Summarization, Long Context and Retrieval
Python
4
star
51

KAISER

Knowledge Acquisition and Interlinking via Semantic Embeddings and Reasoning
4
star
52

lucidrains-projects

A summary of all lucidrains repositores and links to training / research approaches by LAION or other communities.
Jupyter Notebook
3
star
53

decentralized-learning

A basic setup for decentralized-learning that can be used for training future DALLE/CLIP/CLAP models.
3
star
54

diffusion-prior

DALL-E2 diffusion prior
Python
3
star
55

GIF

General / Global Inference Framework
Python
3
star
56

website

This is the development repository of the LAION-AI website.
HTML
3
star
57

safety-pipeline

A collection of safety classifiers and models to process image and texts.
Python
3
star
58

NeoGen

3
star
59

laion5b-subsets

Creating subsets from laion5b via embeddings search
Jupyter Notebook
2
star
60

human_artifacts

A repo containing images for artifact annotation.
2
star
61

public-relations

All media / publicity on LAION and related stuff!
2
star
62

public-domain-images

A collection of public domain images donated for ML training.
2
star
63

math_problems-step-by-step_solutions

Here we provide and collect many functions to generate math problem and step by step solutions for LLM training
Python
2
star
64

language-models

2
star
65

dataset-inference

The new repository for the genral inference pipeline.
Python
2
star
66

introduction-resources

Recommended intro resources
2
star
67

balanced-laion5b

This repository shall help finding a good distribution for huge datasets like LAION-5B for more efficient training.
2
star
68

hand-inference

A model to run hand inference on a cluster.
Jupyter Notebook
2
star
69

BUD-E_V1.0

BUD-E (Buddy) is an open-source voice assistant framework that facilitates seamless interaction with AI models and APIs, enabling the creation and integration of diverse skills for educational and research applications.
1
star
70

laion5b-bias

This repository is a collection of found biases in the LAION-5B dataset.
1
star
71

dataset-tasks

datasets that should be downloaded & converted to our standard training formart.
1
star
72

LAION-AUDIO

This repository contains prompts & best practices to annotate audio clips with a very high degree of details using Audio-Language-Models
1
star
73

AIW_webpage

Alice in Wonderland project and initiative webpage
1
star