Skip to main content

blablado

blablado is an extensible Assistant, that listens to your voice and can execute custom Python functions you provided. It can speak as well. It is based on LangChain and OpenAI's API. You need an openai API account to use it.

Usage: API

You can use it from Python (see example notebook) by

  • initializing an Assistant,
from blablado import Assistant
assistant = Assistant()
  • providing functions/tools and
from datetime import datetime

@assistant.register_tool
def book_room(room:str, author:str, start:datetime, end:datetime):
    """Book a room for a specific person from start to end time."""
    
    print(f"""
    Booking {room} for {author} from {start} to {end}.
    """)
  • prompting for tasks
assistant.do("Hi I'm Robert, please book room A03.21 for me from 3 to 4 pm tomorrow. Thanks")

Output:

I have successfully booked room A03.21 for Robert from 3 to 4 pm tomorrow.

Usage: Microphone

You can also use it via microphone (see example notebook). You need to install some more library before this works:

pip install SpeechRecognition pydub gTTS PyAudio

Therefore, it is recommended to print out the list of available microphones like this:

from blablado import list_microphones
list_microphones()

Example output:

['Microsoft Sound Mapper - Input',
 'Microphone (KLICK&SHOW Audio)',
 'AI Noise-cancelling Input (ASUS',
 'Headset (MAJOR IV Hands-Free AG',
 'Microphone Array (Realtek(R) Au']

Then, choose the right microphone after initializing the assistant:

from blablado import Assistant
assistant = Assistant()
assistant.microphone_index = 3

You can then call the assistant to listen to your voice and execute the function you want to call:

assistant.listen()

Usage: Voice output

To make the voice output work as well, just activate the voice when initializing the assistant:

from blablado import Assistant
assistant = Assistant(has_voice=True)

Installation

blablado is available on pypi and can be installed using pip. It is recommended to install it in a virtual environment, e.g. set up with mamba.

mamba create --name bla python=3.9
mamba activate bla
pip install blablado

To make the voice-output work (optional), consider installing ffmpeg using mamba.

mamba install ffmpeg

Issues

If you encounter any problems or want to provide feedback or suggestions, please create a thread on image.sc along with a detailed description and tag [@haesleinhuepf].

Acknowledgements

Parts of the code reused here were originally written by kevinyamauchi for the bia-bob project.

Metadata

Release files for blablado 0.2.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for blablado 0.2.2
File Size Uploaded
blablado-0.2.2.tar.gz 9.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for blablado 0.2.2
File Interpreter ABI Platform
blablado-0.2.2-py3-none-any.whl Python 3 none any Details

Total release size: 18.3 kB

Release files / blablado-0.2.2.tar.gz

Download URL blablado-0.2.2.tar.gz
Size 9.9 kB
Tags Source
SHA-256 checksum
How to use checksums
063401a51fc3c0e9253736c2c9176c773734f3fcfa65baf1a08048dccce2b1ff
BLAKE2b-256 checksum
How to use checksums
ba5803b475602f8924adc06435f8f3dd9e575869e94e319f1eab48621aaa682a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.11.9

Release files / blablado-0.2.2-py3-none-any.whl

Download URL blablado-0.2.2-py3-none-any.whl
Size 8.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
792663c584dadb2fad34e8c99155c1086d3918373e3abaf3bc8f517d0dbecdd0
BLAKE2b-256 checksum
How to use checksums
333808b0bfa523164617aadeb3c2077cbd6ff86430994f8443e8e50d2a3568ac
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.11.9

Release history Release notifications | RSS feed

This release

0.2.2 This release

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page