Renz Assistant - Enhanced Voice Assistant for Android
An advanced modular voice assistant for Termux on Android devices with full Termux API integration.
๐ Features
- Enhanced Voice Recognition: Multiple voice recognition engines (Termux API, Vosk, Whisper)
- Wake Word Detection: Activate the assistant with customizable wake words
- Continuous Listening: Background listening mode with wake word detection
- Full Termux API Integration: Access all device features through Termux API
- AI-Powered Conversations: Integration with OpenRouter API for intelligent responses
- Multilingual Support: Works in multiple languages (default: Indonesian)
- Device Control: Control device features like brightness, volume, flashlight, etc.
- Weather Information: Get weather forecasts and conditions
- SMS and Call Management: Send SMS, make calls, and view call logs
- Location Services: Access device location and provide location-based services
- Notification Management: Monitor and manage device notifications
- Voice Authentication: Secure access with voice profile recognition
- Camera and Photo Capabilities: Take photos and manage images
- Body Sensor Access: Access health and fitness data
- NFC Control: Read and write NFC tags
- Bluetooth and Wi-Fi Management: Control wireless connections
- Infrared Transmission: Control devices using IR blaster
- Fingerprint Authentication: Secure operations with biometrics
- Customizable Personality: Different assistant personalities and response styles
๐ Requirements
- Android device with Termux installed
- Termux:API app installed
- Python 3.7+ installed in Termux
- Internet connection for AI features and weather information
๐ Installation
-
Install Termux and Termux:API from F-Droid:
-
Open Termux and install required packages:
pkg update && pkg upgrade -y pkg install python git python-pip termux-api ffmpeg -y -
Clone the repository:
git clone https://github.com/yourusername/renz-assistant.git cd renz-assistant -
Install Python dependencies:
pip install -r requirements.txt
-
Run the installation script:
bash install.sh
โ๏ธ Configuration
Renz Assistant has extensive configuration options. Run the interactive setup to configure all settings:
./run_assistant.py --configYou can also access the configuration by saying "configure" or "setup" after activating the assistant.
OpenRouter API Configuration
To use AI features, you need to set up an OpenRouter API key:
- Create an account at OpenRouter
- Get your API key from the dashboard
- Configure Renz Assistant with your API key:
./run_assistant.py --config-openrouter
Voice Recognition Configuration
Configure voice recognition settings:
./run_assistant.py --config-voiceOptions include:
- Engine selection (Termux API, Vosk, Whisper)
- Wake word customization
- Continuous listening mode
- Language settings
- Noise suppression and audio processing
Termux API Permissions
Configure Termux API permissions:
./run_assistant.py --config-termuxAvailable permissions:
- Location (background, foreground approximate, foreground precise)
- Camera and microphone access
- SMS and call functionality
- Network and Wi-Fi control
- Body sensors access
- NFC and Bluetooth control
- And many more
๐ฎ Usage
Starting the Assistant
./run_assistant.pyVoice Authentication
On first run, you'll be prompted to create a voice profile for authentication:
- Choose recording method (record new samples or use existing WAV files)
- If recording new samples, speak the prompted phrase clearly
- The system will create your voice profile for future authentication
Wake Words
Activate the assistant with any of these wake words:
- "Hey Renz"
- "Ok Renz"
- "Hello Renz"
- "Hi Renz"
- "Renz"
- "Wake up Renz"
- "Renz bangun"
- "Renz aktif"
- And many more (customizable in settings)
Sleep Words
Put the assistant to sleep with:
- "Renz turn off the system"
- "Tidur Renz"
- "Goodbye Renz"
- "Renz sleep"
- And others (customizable in settings)
Example Commands
- "What's the weather like today?"
- "Send a message to John"
- "Call Mom"
- "Set brightness to 80%"
- "Turn on the flashlight"
- "What time is it?"
- "Tell me a joke"
- "What's the capital of France?"
- "Open WhatsApp"
- "Get my current location"
- "Take a photo"
- "Enable Wi-Fi"
- "Set volume to 10"
- "Configure settings"
๐ฑ Termux API Features
Renz Assistant integrates with all Termux API features:
Location Services
- Background location tracking
- Foreground approximate location
- Foreground precise location
Device Control
- Screen brightness control
- Volume control
- Flashlight control
- Vibration control
- Wake lock management
- Wallpaper setting
Communication
- SMS sending and reading
- Phone call management
- Call log access
- Contact management
Notifications
- Notification monitoring
- Notification creation
- Notification removal
Sensors
- Battery status monitoring
- Wi-Fi control and monitoring
- Bluetooth control
- NFC reading and writing
- Body sensors access
- Infrared transmission
Media
- Camera access for photos
- Audio recording
- Text-to-speech
- Speech-to-text
System
- Clipboard access
- Storage access
- Dialog creation
- Toast messages
๐ง Troubleshooting
Termux API Not Available
If you see "Termux API not available" errors:
- Make sure Termux:API app is installed
- Run
termux-setup-storageto grant storage permissions - Restart Termux and try again
Voice Recognition Issues
If voice recognition is not working properly:
- Try changing the voice recognition engine in the configuration
- Make sure you have granted microphone permissions to Termux
- Check if your device supports the selected voice recognition engine
OpenRouter API Issues
If AI features are not working:
- Check your internet connection
- Verify your API key is correctly configured
- Check if you have exceeded your API usage limits
Microphone Issues
If you encounter microphone recording problems:
- Ensure Termux API has microphone permissions
- Run
termux-microphone-infoto check if your microphone is detected - Try
termux-setup-storageto ensure proper storage access
TTS Issues
If text-to-speech doesn't work:
- Check your internet connection (edge-tts requires internet)
- Ensure volume is turned up
- Try
termux-tts-speak "test"to verify Termux TTS is working
๐ Project Structure
renz_assistant/
โโโ modules/
โ โโโ __init__.py
โ โโโ audio.py # Audio processing and TTS
โ โโโ config.py # Configuration management
โ โโโ device.py # Device-specific functions with Termux API
โ โโโ nlp.py # Natural language processing
โ โโโ openrouter.py # AI integration with OpenRouter
โ โโโ services.py # Background services
โ โโโ storage.py # Data persistence
โ โโโ utils.py # Utility functions
โ โโโ voice_recognition.py # Enhanced voice recognition
โ โโโ weather.py # Weather services
โโโ __init__.py
โโโ main.py # Main assistant class
๐จ Customization
Personality Profiles
Edit the personality profiles in storage.py to customize how the assistant responds:
- friendly
- funny
- serious
- teacher
- calm
Language Preference
Change the default language in user preferences:
- "id" for Indonesian
- "en" for English
Voice Recognition Engine
Choose between different voice recognition engines:
- termux_api: Uses Termux API's built-in speech recognition
- vosk: Offline speech recognition (requires additional model download)
- whisper: High-accuracy speech recognition using OpenAI's Whisper model
๐ค Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
๐ License
This project is licensed under the MIT License - see the LICENSE file for details.
๐ Acknowledgements
- Termux for the terminal emulator
- Termux:API for the Android API integration
- OpenRouter for the AI capabilities
- Vosk for offline speech recognition
- OpenAI Whisper for advanced speech recognition