FAST (Field Agent Support Technology)
March 13, 2025 · View on GitHub
Field Agent Support Technology - real-time dialog support from hybrid LLM / human team
Overview
FAST is a real-time dialog support system that provides contextually relevant suggestions and responses through a user's earbuds during conversations. The system processes live audio, transcribes speech, analyzes conversation context, and generates appropriate response suggestions.
System Architecture
FAST is built on a modular, agent-based architecture with the following components:
Core Components
-
UniLang Agent System
- FAST operates as a UniLang agent, enabling communication with other agents
- Message-passing architecture for distributed processing
-
Speech Recognition
- Integrates with whisper-ctranslate2 for real-time speech-to-text capabilities
- Processes audio input from the user's environment through earbuds
-
Dialog Management
- Maintains structured conversation history
- Tracks utterances with contextual metadata
- Implements timing controls for appropriate response generation
-
LLM Integration
- Uses template-based approach for prompting language models
- Communicates with LLM services via the FAST::LLMClient module
- Generates contextually relevant responses based on conversation history
-
Response Delivery
- Text-to-speech synthesis using espeak
- Audio playback to the user's earbuds
Technical Implementation
Key Files and Modules
- FAST.pm: Core module implementing the UniLang agent functionality
- fast: Main executable script that initializes the system
- FAST/LLMClient.pm: Client for LLM integration and templating
- FAST/Util/LLMClientClient.pm: Utility for asynchronous LLM interactions
- scripts/fast-asr: Script for ASR (Automatic Speech Recognition) processing
- scripts/start-echelon.pl: Script to initialize the whisper-ctranslate2 environment
- scripts/fast-aggregator.pl: Implementation for response selection and aggregation
Data Structure
Each utterance in the dialog history contains:
{
utterance: "transcribed text",
timestamp: [time value],
metadata: {
is_user: [boolean],
context_tags: [],
social_cues: {
// Data on tone, urgency, emotional state
},
response_metrics: {
response_time: [value],
was_helpful: [boolean],
user_followed_suggestion: [boolean]
}
}
}
Setup and Usage
Prerequisites
- Perl environment with required modules:
- UniLang::Agent
- Expect
- JSON
- Time::HiRes
- Python 3.9 environment for whisper-ctranslate2
- espeak for text-to-speech functionality
- mplayer for audio playback
Installation
- Clone the repository
- Install required Perl modules
- Set up conda environment for whisper-ctranslate2:
conda create -n whisper-ctranslate2 python==3.9 - Install whisper-ctranslate2 in the conda environment
Running FAST
- Start the UniLang server if not already running
- Launch FAST as a UniLang agent:
./fast -u - Start the ASR component:
./scripts/fast-asr - Begin conversation after the "ready player one" trigger phrase
Future Development
Based on the to.do file and existing code structure, planned features include:
- Speaker Diarization: Identify and distinguish between different speakers
- Simulation Mode: Role-playing capability where FAST simulates conversation partners
- Multi-Agent Response Aggregation: Implement hierarchical response selection from multiple AI agents
- Enhanced Context Analysis: Improved understanding of conversation dynamics
- User Feedback Integration: Learning from the effectiveness of suggested responses
Project Structure
fast/
├── FAST.pm # Core module
├── fast # Main executable
├── README.md # This file
├── to.do # Development notes
├── frdcsa/
│ └── FRDCSA.xml # System metadata
├── FAST/
│ ├── LLMClient.pm # LLM integration
│ └── Util/
│ └── LLMClientClient.pm # Utility functions
├── data-git/
│ └── prompts/
│ └── flp/
│ └── fast_retort.tt # LLM prompt template
└── scripts/
├── start-echelon.pl # ASR initialization
├── fast-aggregator.pl # Response aggregation
└── fast-asr # Speech recognition
License
GPLv3
FAST: Enhancing real-time communication with contextually relevant assistance