Skip to main content

A local-first voice AI assistant framework. Create your own JARVIS.

Project description

anyrobo

Build your own JARVIS — local-first voice AI

PyPI Python License

A local-first voice AI assistant framework. Create your own JARVIS with pluggable TTS, STT, and LLM backends. Works completely offline with local models.

Built by Viet-Anh Nguyen at NRL.ai.

Installation

pip install anyrobo

With all optional backends:

pip install anyrobo[all]

Quick Start

import anyrobo

# Create an assistant with a personality
assistant = anyrobo.Assistant(personality="jarvis")

# Add custom tools
def get_weather(location: str) -> str:
    """Get the current weather for a location."""
    return f"Sunny in {location}"

assistant.add_tool(get_weather, description="Get weather for a location")

# Chat with the assistant
response = assistant.chat("What's the weather in Paris?")
print(response)

# Stream responses
for chunk in assistant.chat("Tell me a story", stream=True):
    print(chunk, end="")

Personalities

jarvis = anyrobo.Personality.builtin("jarvis")   # Helpful butler
glados = anyrobo.Personality.builtin("glados")   # Sarcastic AI
default = anyrobo.Personality.builtin("assistant")  # Neutral assistant

Memory

memory = anyrobo.ConversationMemory(max_messages=100, persistence_path="memory.json")
memory.add("user", "Hello")
memory.add("assistant", "Hi there!")
results = memory.search("hello")

Events

@assistant.on("tool_call")
def log_tool(name, args):
    print(f"Calling {name} with {args}")

Configuration

Create a YAML config file:

personality: jarvis
llm:
  backend: ollama
  model: llama3
stt:
  backend: whisper
  model_size: base
tts:
  backend: pyttsx3
config = anyrobo.AssistantConfig.from_yaml("config.yaml")
assistant = anyrobo.Assistant(config=config)

CLI

anyrobo chat          # Interactive chat
anyrobo listen        # Voice input mode
anyrobo config show   # Show current config

Backends

LLM

  • Ollama (default) - Local LLM inference
  • OpenAI - OpenAI API

Speech-to-Text

  • Whisper (default) - OpenAI Whisper local model
  • Vosk - Offline STT

Text-to-Speech

  • pyttsx3 (default) - Offline TTS
  • ElevenLabs - Cloud TTS API

License

MIT License - see LICENSE for details.

Author

Viet-Anh Nguyen (@vietanhdev)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

anyrobo-0.2.1.tar.gz (25.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

anyrobo-0.2.1-py3-none-any.whl (27.1 kB view details)

Uploaded Python 3

File details

Details for the file anyrobo-0.2.1.tar.gz.

File metadata

  • Download URL: anyrobo-0.2.1.tar.gz
  • Upload date:
  • Size: 25.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.9

File hashes

Hashes for anyrobo-0.2.1.tar.gz
Algorithm Hash digest
SHA256 ce1dfbc198e52cbef283f4503121e0097f7b72426b1d3c075c4697939bf827d7
MD5 4443e6bd2d835cb15f173bc1f8d603eb
BLAKE2b-256 45ae4ce5c120fa94ee1fe57a9d04b43e8d7df4fbf323111606cd9b98c4623cc6

See more details on using hashes here.

File details

Details for the file anyrobo-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: anyrobo-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 27.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.9

File hashes

Hashes for anyrobo-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 9ce114027a29564d53bce2a8a424de68fabf56faa368d4860affaf293f7e2511
MD5 332fe6ef4bd3b6e106bb3a14b65ce4ba
BLAKE2b-256 9b6c428b22d05b94cbffce6b0d7253594c507a29d4a2d39a70837e88b6ae5101

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page