🎤 Advanced Voice Assistant with Robust Wake Word Detection & Google Speech Integration
HeardAI is an enhanced iOS voice assistant that provides superior wake word detection, high-accuracy transcription using Google Cloud Speech-to-Text, and seamless Siri integration.
- Reliable Detection: "Hey HeardAI" wake word with audio level monitoring
- Real-time Processing: Continuous audio monitoring with visual feedback
- Noise Handling: Adaptive thresholds for different environments
- High Accuracy: Google Cloud Speech-to-Text API for superior transcription
- Real-time Processing: Live audio capture and conversion
- WAV Format Support: Proper audio format conversion for API compatibility
- 8 Command Types: Reminders, messages, calls, weather, music, timers, alarms, general
- Smart Parsing: Automatic command type detection and parameter extraction
- Proper Integration: Uses SiriKit instead of problematic URL schemes
- Edit Commands: Review and modify transcribed commands before execution
- User Control: Accept or reject commands with visual feedback
- Command History: Track previous commands for reference
- Xcode 14.0 or later
- iOS 16.0 or later
- Physical iOS device (audio features don't work in simulator)
- Google Cloud Speech-to-Text API key
-
Clone the repository
git clone https://github.com/Codingbysid/HeardAI1.git cd HeardAI1 -
Open in Xcode
open HeardAI.xcodeproj
-
Configure API Key
- The Google Speech API key is already configured in
Info.plist - Current key:
0ac4a773d6788813e45539a3ee8c4bdf6767faa8
- The Google Speech API key is already configured in
-
Build and Run
- Select your physical device
- Build and run the project (⌘+R)
- Launch the app and grant microphone permissions
- Say "Hey HeardAI" to activate the assistant
- Speak your command clearly after the wake word
- Review and edit the transcribed command if needed
- Accept or reject the command for execution
| Command Type | Examples |
|---|---|
| Reminders | "remind me to call mom", "set reminder for meeting" |
| Messages | "send message to John", "text Sarah hello" |
| Calls | "call dad", "phone mom" |
| Weather | "what's the weather", "weather forecast" |
| Music | "play music", "play Bohemian Rhapsody by Queen" |
| Timers | "set timer for 5 minutes", "timer 10 minutes" |
| Alarms | "set alarm for 7 AM", "wake me up at 8" |
| General | "what time is it", "open settings" |
- AudioManager: Handles wake word detection and audio processing
- WhisperService: Google Speech-to-Text integration
- SiriService: Command parsing and Siri execution
- SpeechRecognizer: On-device speech recognition fallback
- SwiftUI: Modern declarative UI framework
- AVFoundation: Audio capture and processing
- Google Cloud Speech-to-Text: High-accuracy transcription
- SiriKit: Proper Siri integration with intents
- Combine: Reactive programming for state management
<key>NSMicrophoneUsageDescription</key>
<string>HeardAI needs microphone access to listen for voice commands and the wake word "Hey HeardAI".</string>
<key>NSSpeechRecognitionUsageDescription</key>
<string>HeardAI uses speech recognition to accurately transcribe your voice commands before sending them to Siri.</string>- iOS Deployment Target: 16.0
- Swift Language Version: Swift 5
- Enable Bitcode: No
- Wake word detection in quiet environment
- Wake word detection in noisy environment
- Command transcription accuracy
- Siri command execution
- Command confirmation flow
- Use the "Test Command (Demo)" button to simulate wake word detection
- Test the command confirmation system without voice input
"Speech recognition not available"
- Ensure testing on physical device (not simulator)
- Check speech recognition permissions
- Verify internet connectivity
"Google Speech API error"
- Verify API key is valid and active
- Check network connectivity
- Ensure API quotas haven't been exceeded
"Wake word not detected"
- Speak clearly and at normal volume
- Ensure microphone permissions are granted
- Check that the app is in the foreground
This project is licensed under the MIT License - see the LICENSE file for details.
- Google Cloud for the Speech-to-Text API
- Apple for Speech Framework and SiriKit
- SwiftUI community for UI best practices
- Issues: GitHub Issues
- Discussions: GitHub Discussions
Made with ❤️ for the iOS community
⭐ Star this repository if you find it helpful!