A hands-free voice assistant for the Distiller Alpha CM5 device using Claude AI - with the personality and voice of Skeletor!
- Wake word activation: Say "Skeletor" to activate the assistant
- Skeletor personality: Claude responds as the evil overlord from He-Man, with theatrical villainy and dark humor
- Skeletor voice: Deep, menacing voice with pitch-shifted audio (18kHz playback for deeper tone)
- Natural conversation: Powered by Claude 3.5 Sonnet
- Voice input: Uses Parakeet speech-to-text with voice activity detection
- Voice output: Uses Piper text-to-speech with pitch modification
- Conversation memory: Maintains context across multiple interactions
export ANTHROPIC_API_KEY='your-api-key-here'To make this permanent, add it to your ~/.bashrc:
echo "export ANTHROPIC_API_KEY='your-api-key-here'" >> ~/.bashrc
source ~/.bashrcsource /opt/distiller-cm5-sdk/activate.sh
cd /opt/distiller-cm5-sdk
uv add anthropicsource /opt/distiller-cm5-sdk/activate.sh
cd "/home/distiller/projects/hands free assistant"
python skeletor_assistant.py- Start the assistant: Run the script as shown above
- Activate with wake word: Say "Skeletor" clearly
- Wait for confirmation: The assistant will respond with "Yes?"
- Speak your command: You have ~5 seconds to speak your question or command
- Listen to response: Claude will process and respond via voice
- Repeat: The assistant continues listening for the wake word
- Continuous Listening: Uses VAD (Voice Activity Detection) to monitor audio
- Wake Word Detection: Transcribes speech and checks for "Skeletor"
- Command Capture: After wake word, records ~5 seconds for your command
- Claude Processing: Sends transcribed text to Claude API with Skeletor personality prompt
- Voice Response: Converts Claude's text response to speech via Piper TTS with pitch-shifted audio to sound like Skeletor (deeper, more menacing)
Make sure you've exported ANTHROPIC_API_KEY in your environment.
- Check microphone:
arecord -l - Check speaker:
aplay -l - Ensure user is in audio group:
groups
- Speak clearly and enunciate "Skeletor"
- Check microphone gain (automatically set to 85)
- Look at logs to see what text is being transcribed
- Check API key is valid
- Ensure internet connection is working
- Look at logs for API errors
Edit skeletor_assistant.py and modify:
self.wake_word = "your-wake-word"Change the volume parameter in the run() call:
assistant.run(volume=80) # 0-100Modify the model in process_with_claude():
model="claude-3-5-sonnet-20241022" # or other Claude modelsChange timeout in listen_for_command():
command = self.listen_for_command(timeout=10) # secondsIn the speak() method, change the playback sample rate:
# Lower rate = deeper voice (Skeletor default: 18000)
# Original pitch: 22050
# Deeper: 16000-18000
# Even deeper: 14000-16000
playback_cmd = f"aplay -D plughw:{hw_num} -r 18000 {tmp_path}"Remove or modify the system parameter in process_with_claude() to use a normal assistant personality
Press Ctrl+C to stop the assistant.