Advanced AI assistant with Microsoft Phi-4 Multimodal integration, voice, vision, and robotics capabilities
Project description
Tektra AI Assistant
Tektra AI Assistant is an advanced AI assistant featuring Microsoft Phi-4 Multimodal integration with superior voice, vision, and robotics capabilities. It delivers state-of-the-art speech recognition, intelligent chat completion, and multimodal understanding with persistent conversation management and a beautiful web interface.
✨ Features
🧠 Advanced AI Integration
- Microsoft Phi-4 Multimodal: Primary processor with #1 OpenASR leaderboard performance
- Intelligent Fallback: Automatic fallback to OpenAI Whisper for reliability
- Unified Architecture: Single model handles speech recognition and chat completion
- 8-Language Support: English, Chinese, German, French, Italian, Japanese, Spanish, Portuguese
- Streaming Responses: Real-time token-by-token generation with 128K context
- Model Management: Load, unload, and switch between models with automatic device detection
💬 Rich Chat Interface
- Persistent Conversations: Full conversation history with database storage
- Real-time Chat: WebSocket-based streaming chat
- Conversation Management: Create, search, organize, and delete conversations
- Message Actions: Copy, regenerate, and manage individual messages
- Beautiful UI: Modern, responsive web interface
🎤 Superior Voice & Multimodal Capabilities
- Advanced Speech Recognition: Phi-4 Multimodal with superior accuracy and 8-language support
- Real-time Transcription: WebSocket-based streaming with voice activity detection
- Intelligent TTS: Edge-TTS with 200+ neural voices and automatic language matching
- Noise Cancellation: WebRTC VAD with advanced audio preprocessing
- Multimodal Understanding: Vision, audio, and text processing in unified model
- Camera Integration: Real-time video processing with computer vision
🤖 Robotics & Automation
- Robot Control: Command and control robotic systems
- Avatar System: 3D avatar with expressions and gestures
- Real-time Communication: WebSocket-based robot communication
- Safety Features: Emergency stop and safety monitoring
🚀 Quick Start
Installation
Install Tektra with pip:
# Basic installation
pip install tektra
# With all optional features
pip install tektra[all]
# With specific features
pip install tektra[ml,audio,vision]
Setup and First Run
-
Initial Setup (first time only):
tektra setup -
Start the Assistant:
tektra start -
Enable Phi-4 for Enhanced Performance (Recommended):
# In a new terminal window tektra enable-phi4
-
Open Your Browser: The web interface will automatically open at
http://localhost:8000
That's it! 🎉
🚀 Quick Enhanced Setup
For the best experience in one command:
tektra enhance # Starts server and guides Phi-4 setup
🚀 New in v0.6.0 - Phase 3.1 Features
Microsoft Phi-4 Multimodal Integration
- Superior Speech Recognition: #1 performance on OpenASR leaderboard
- Unified Processing: Single model for both STT and chat completion
- 8-Language Audio Support: Enhanced multilingual capabilities
- 128K Context Length: Extended context for better understanding
- Intelligent Fallback: Automatic Whisper fallback for reliability
Enhanced API Endpoints
/api/v1/audio/phi4/load- Load Phi-4 Multimodal model/api/v1/audio/phi4/unload- Unload model to free memory/api/v1/audio/phi4/info- Get model status and capabilities- Enhanced transcription and language detection with Phi-4 primary processing
Performance Improvements
- Faster Processing: Unified model reduces latency
- Better Accuracy: Superior speech recognition and understanding
- Memory Efficiency: Optimized model loading and device detection
- Real-time Streaming: Enhanced WebSocket processing with Phi-4
📖 Usage
Command Line Interface
# Start the server (with options)
tektra start --host 0.0.0.0 --port 8000 --browser
# Setup for first use
tektra setup
# Enhanced setup (server + Phi-4 guidance)
tektra enhance
# Enable Phi-4 Multimodal (superior AI)
tektra enable-phi4
# Check Phi-4 status
tektra phi4-status
# Disable Phi-4 (free memory)
tektra disable-phi4
# Show system information
tektra info
# Show version
tektra version
# Get help
tektra --help
Web Interface
Once started, you can:
- Chat with AI: Start conversations with intelligent responses
- Manage Conversations: Browse, search, and organize your chat history
- Voice Interaction: Use voice input and output
- Control Systems: Manage robots, avatars, and connected devices
🔧 Configuration
Environment Variables
Create a .env file in your working directory:
# Database
DATABASE_URL=sqlite:///./tektra.db
# Server
HOST=0.0.0.0
PORT=8000
DEBUG=false
# AI Models
MODEL_CACHE_DIR=./models
MAX_MODEL_MEMORY_GB=8
# Audio
AUDIO_SAMPLE_RATE=16000
MAX_AUDIO_DURATION=30
# API Keys (optional)
OPENAI_API_KEY=your_openai_key
ANTHROPIC_API_KEY=your_anthropic_key
🏗️ Architecture
Tektra AI Assistant is built with a modern, modular architecture:
tektra/
├── app/ # Main application
│ ├── routers/ # API endpoints
│ ├── services/ # Business logic
│ ├── models/ # Database models
│ ├── database.py # Database management
│ └── config.py # Configuration
├── frontend/ # Web interface (React/Next.js)
├── cli.py # Command-line interface
└── server.py # Server management
Technology Stack
- Backend: FastAPI, SQLAlchemy, WebSockets, Python 3.9+
- Frontend: Next.js, React, TypeScript, Tailwind CSS
- Database: SQLite (default), PostgreSQL (optional)
- AI/ML: Transformers, PyTorch, MLX (Apple Silicon)
- Audio: PyAudio, LibROSA, SoundFile
- Vision: OpenCV, MediaPipe
📦 Installation Options
Basic Installation
pip install tektra
With Machine Learning
pip install tektra[ml]
With Audio Support
pip install tektra[audio]
With Vision Support
pip install tektra[vision]
With Robotics Support
pip install tektra[robotics]
Everything Included
pip install tektra[all]
Development Installation
git clone https://github.com/tektra/tektra.git
cd tektra
pip install -e .[dev,all]
🛠️ Development
Setting Up Development Environment
# Clone the repository
git clone https://github.com/tektra/tektra.git
cd tektra
# Install in development mode
pip install -e .[dev,all]
# Set up pre-commit hooks
pre-commit install
# Run tests
pytest
# Start development server
tektra start --reload --debug
🐛 Troubleshooting
Common Issues
Installation Problems:
# If you get permission errors
pip install --user tektra
# If you have dependency conflicts
pip install tektra --no-deps
pip install -r requirements.txt
Audio Issues:
# On macOS
brew install portaudio
pip install pyaudio
# On Ubuntu/Debian
sudo apt-get install portaudio19-dev
pip install pyaudio
Database Issues:
# Reset database
rm tektra.db
tektra setup
📄 License
This project is licensed under the MIT License - see the LICENSE file for details.
Made with ❤️ by the Tektra Team
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file tektra-0.6.5.tar.gz.
File metadata
- Download URL: tektra-0.6.5.tar.gz
- Upload date:
- Size: 636.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0fcacbdbafe879026467b86f0663113e9b2f601479eec48e3db5bed62505fed7
|
|
| MD5 |
0ed12d5ed7cfd328db9d0b51a50a62be
|
|
| BLAKE2b-256 |
d0966f4883a25180fbf7bad7de6136eca1a2105f0b78c08e9cab1a6dd45fd236
|
Provenance
The following attestation bundles were made for tektra-0.6.5.tar.gz:
Publisher:
pypi.yml on dirvine/tektra
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
tektra-0.6.5.tar.gz -
Subject digest:
0fcacbdbafe879026467b86f0663113e9b2f601479eec48e3db5bed62505fed7 - Sigstore transparency entry: 238783896
- Sigstore integration time:
-
Permalink:
dirvine/tektra@707d23c72e5cdb77edccfe1bcedfa910c939e7ac -
Branch / Tag:
refs/tags/v0.6.5 - Owner: https://github.com/dirvine
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi.yml@707d23c72e5cdb77edccfe1bcedfa910c939e7ac -
Trigger Event:
push
-
Statement type:
File details
Details for the file tektra-0.6.5-py3-none-any.whl.
File metadata
- Download URL: tektra-0.6.5-py3-none-any.whl
- Upload date:
- Size: 661.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
df7feacd2247c62c08feb1baed6afc5f262859ec4a888b1b35898f5be29ab83e
|
|
| MD5 |
461fe7102fc39650eece41634de177cf
|
|
| BLAKE2b-256 |
7c1bfbc8348c3f530aafe259969cf1b7f435d5bb7da72664d60a393e2e26f99a
|
Provenance
The following attestation bundles were made for tektra-0.6.5-py3-none-any.whl:
Publisher:
pypi.yml on dirvine/tektra
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
tektra-0.6.5-py3-none-any.whl -
Subject digest:
df7feacd2247c62c08feb1baed6afc5f262859ec4a888b1b35898f5be29ab83e - Sigstore transparency entry: 238783897
- Sigstore integration time:
-
Permalink:
dirvine/tektra@707d23c72e5cdb77edccfe1bcedfa910c939e7ac -
Branch / Tag:
refs/tags/v0.6.5 - Owner: https://github.com/dirvine
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi.yml@707d23c72e5cdb77edccfe1bcedfa910c939e7ac -
Trigger Event:
push
-
Statement type: