Leon Documentation

website·Indexed 34 days ago

https://docs.getleon.ai/

Documentation for Leon, an open-source personal assistant. It covers high-level architecture, configuration of STT/TTS providers, offline node setup, and the implementation of packages, modules, and bridges. Includes guides for the HTTP API, CLI, and web app clients across versions 1.0.0-beta.4 through 1.0.0-beta.7+dev.

Tokens
28.1K
Snippets
185
Records
270
Agent score
59%

What's inside Leon

  1. Overview of Leon Personal Assistant

    Leon is an open-source personal assistant that can be hosted on your own server. It supports both voice and text communication and can be configured to operate offline to ensure user privacy. Leon uses a modular architecture (packages/modules) allowing users to create and share custom skills.
  2. Overview of Leon personal assistant

    Leon is an open-source personal assistant that can be hosted on your own server. It supports both voice and text communication and can be configured to operate offline to ensure user privacy. Leon uses a modular architecture (packages/modules) allowing users to create and share custom skills.
  3. Overview of Leon personal assistant

    Leon is an open-source personal assistant that can be hosted on your own server. It supports both voice and text communication and can be configured to operate offline to ensure user privacy. Leon uses a modular structure of 'skills' (packages/modules) that allows users to extend its functionality and share custom modules.
  4. Overview of Leon personal assistant

    Leon is an open-source personal assistant that can be hosted on your own server. It supports voice and text interaction and can be configured to operate offline to ensure user privacy. Leon uses a modular structure of packages/modules (skills) that allows users to create and share custom functionality.
  5. Understand Leon's Voice Processing (ASR, STT, TTS)

    Leon handles voice interaction through three main processes:

    • ASR (Automatic Speech Recognition): The general process of identifying and processing human voice to make it understandable for the system.
    • STT (Speech-To-Text): Specifically transforms an audio stream into a text string. Leon supports multiple STT parsers that can be configured.
    • TTS (Text-To-Speech): Transforms a text string back into an audio stream. Leon supports multiple TTS synthesizers that can be configured.
  6. Manage Leon's Natural Language Understanding (NLU) components

    Leon uses several components to process human language:

    • Expressions: Datasets used to train Leon's understanding. Each package has its own translated expression sets.
    • Classifier: A model that stores the outcomes of the expressions training phase and outputs results via an algorithm to help Leon make decisions.
    • NLU (Natural Language Understanding): The core system that employs the classifier to understand human language and select the appropriate response path.
  7. Understand Leon's Package and Module structure

    Leon's capabilities are organized into Modules (skills) and Packages (categories of modules). A package is a folder containing one or more modules. Modules are currently written in Python and contain one or more actions to perform specific tasks. When a user request is understood, Leon triggers a module action, executes the job, and returns the output.
  8. Understand Leon's Natural Language Understanding (NLU) flow

    Leon processes human language using the following pipeline:

    1. NLU (Natural Language Understanding): Helps the system understand human language and selects the most appropriate classifier.
    2. Classifier: A trained model that outputs a result via an algorithm based on the training phase of expressions. This result is used to make decisions on which action to trigger.
  9. Understand the Leon high-level request and response flow

    Leon processes user interactions primarily through WebSockets. The typical flow from user input to response is as follows:

    1. Activation: If the hotword server is active, Leon listens offline for the wake word 'Leon'. Once detected, a message is emitted to the main server via WebSocket.
    2. Input Capture: Audio input is captured by the client as an audio blob, or the user provides text input via keyboard.
    3. Speech Processing: For audio, the ASR (Automatic Speech Recognition) transforms the blob into a wave file, and the STT (Speech-to-Text) parser converts that wave file into a string.
    4. Intent Analysis: The resulting string is forwarded to the NLU (Natural Language Understanding) unit, which classifies the input. If the collaborative logger is enabled, this classification is recorded.
    5. Execution: The Brain creates a child process to execute the appropriate module based on the NLU classification. If the synchronizer is enabled and supported by the module, content is synchronized.
    6. Response Generation: The Brain generates an answer and forwards it to the TTS (Text-to-Speech) synthesizer.
    7. Output: The TTS synthesizer converts the text answer into an audio buffer for the client to play, while also sending the text version of the answer to the user.
  10. Understand Leon's NLU and Classification process

    Leon processes human language using the following components:

    • NLU (Natural Language Understanding): Used to load the most appropriate classifier for a given input.
    • Classifier: A trained model that outputs a result via an algorithm to make decisions based on the outcomes of the expressions training phase.
  11. Understand Leon's Module and Action architecture

    Leon's functionality is organized into a hierarchy: Packages contain Modules, and Modules contain Actions.

    • Packages: Act as 'domains' (in NLP terms) to categorize modules and store associated answers and expressions.
    • Modules: Represent Leon's specific skills.
    • Actions: The actual entry points within a module that execute specific tasks (e.g., createlist or completetodo in a To-Do List module).
  12. Understand the role of Leon's Brain

    The Brain is the core component of Leon where the primary execution happens. It is responsible for executing modules, handling speech output, and processing captured sentences.