Skip to main content

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

Project description

anyrobo

anyrobo logo

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.0.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.0-py3-none-any.whl (27.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: anyrobo-0.2.0.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.0.tar.gz
Algorithm Hash digest
SHA256 7a68f36052a9eb4ff4a7d2acda8cb5a248fd4e69c1071e7ed177b040777a2c89
MD5 a634569c8f220ba0e5fc727780bb9fad
BLAKE2b-256 edcab35af59e4fbddce8ab87bd42bca4d27f81693f326624828629ed2f9fddb7

See more details on using hashes here.

File details

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

File metadata

  • Download URL: anyrobo-0.2.0-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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 52741163310addf2e8091cf16d954af9b3c550923421801e3523df1af7fd6ce6
MD5 b0359428309f139dba5d1aa717c7e9d3
BLAKE2b-256 c628fdfd7f8483b50ff8a3f06442e31fbc1bed38fa009f690b81f2d5173ba41e

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