An innovative iOS app that combines nostalgia with cutting-edge machine learning to identify Pokémon by their cries using CoreML and CreateML.
PokéDexAI is a SwiftUI-based iOS application that demonstrates advanced iOS development skills by implementing real-time sound classification using Apple's CoreML framework. The app features a retro Game Boy Advance aesthetic while showcasing modern machine learning capabilities to identify Pokémon through audio recognition.
- Audio-Based Pokémon Recognition: Record Pokémon cries and instantly identify them using a custom-trained CoreML model
- Real-time Sound Analysis: Leverages Apple's SoundAnalysis framework for efficient audio processing
- Retro UI Design: Pixel-perfect Game Boy Advance-inspired interface with custom fonts
- SwiftUI Navigation: Modern navigation patterns with programmatic navigation and sheet presentations
- Detailed Pokédex Entries: Complete information display including species, height, weight, and descriptions for 5 Pokémon (Bulbasaur, Charmander, Jigglypuff, Pikachu, and Squirtle)
- SwiftUI: 100% SwiftUI implementation for modern, declarative UI
- CoreML: Custom machine learning model integration for sound classification
- CreateML: Used to train the
PokedexCryClassifierModelfor audio recognition - SoundAnalysis: Apple's framework for analyzing audio signals
- AVFoundation: Audio recording and session management
- Combine: Reactive programming for state management
- MVVM Pattern: Clean separation of concerns with observable objects
- Custom ML Model:
PokedexCryClassifierModel.mlmodel(17KB) trained on Pokémon cry audio samples - Modular Components: Reusable views and well-organized file structure
- Type Safety: Full Codable compliance for data models
- Permission Handling: Proper microphone permission requests and error handling
PokedexAI/
├── Views/
│ ├── ContentView.swift # Main list view with navigation
│ ├── SoundRecorderView.swift # Audio recording & ML analysis
│ └── PokemonDetailView.swift # Detailed Pokémon information
├── Models/
│ ├── Pokemon.swift # Core data model
│ ├── PokemonLoader.swift # JSON data loading
│ └── ResultObserver.swift # Sound analysis observer
├── CoreML/
│ └── PokedexCryClassifierModel.mlmodel # Custom-trained ML model
└── Resources/
├── pokemon.json # Pokémon database
└── Assets.xcassets/ # Images and colors
- Recording: 3-second audio capture using AVAudioRecorder
- Processing: Audio file analysis with SNAudioFileAnalyzer
- Classification: ML model inference using SNClassifySoundRequest
- Navigation: Automatic navigation to identified Pokémon's detail view
- Custom "Pixel Emulator" font for authentic retro feel
- Type-specific color palette (18 unique type colors)
- Responsive list interface with NavigationStack
- Modal sheet presentation for recording interface
- Smooth programmatic navigation with result handling
// CoreML model initialization
let model = try PokedexCryClassifierModel(configuration: MLModelConfiguration())
let request = try SNClassifySoundRequest(mlModel: model.model)
// Real-time audio analysis
let analyzer = try SNAudioFileAnalyzer(url: audioURL)
analyzer.add(request, withObserver: ResultObserver { result in
// Handle classification results
})- Proper AVAudioSession configuration for recording
- Permission handling with user-friendly error messages
- Automatic recording duration control (3 seconds)
- Temporary file management for audio data
- JSON-based Pokémon database with full Codable support
- Efficient data loading from Bundle resources
- Type-safe model structures with Identifiable protocol
- iOS 17.0+
- Xcode 15.0+
- iPhone with microphone access
- Swift 5.9+