ClosedCaptioner
A beautiful iOS app for real-time speech-to-text with closed captioning capabilities.
Features
- ๐ค Real-time Speech Recognition: Tap the mic button to speak and get instant text transcription (auto-stops after 15 seconds)
- ๐ Three Display Modes:
- Day Mode: White background, black text
- Night Mode: Black background, white text (default)
- Discreet Mode: Low-contrast for privacy
- โจ๏ธ Text Editor: Full keyboard support to edit transcribed text
- โจ Smart Emojis: Automatic emoji detection based on text content using Natural Language framework
- ๐จ Beautiful UI: Large, bold text optimized for readability in portrait mode
- ๐๏ธ Quick Erase: Tap erase button for quick screen clearing with โโจPoof!!!โจโ animation
- ๐ Caption History: Track and recall previous captions with timestamps
- ๐พ Export Functionality: Export captions to text, PDF, HTML (available via ExportManager)
- ๐ฒ Shake for Fun: Shake device to replace text with pickup lines (when mic is off)
Controls (Portrait Mode)
- Top Left: Settings (History + Purchases)
- Top Right: Display mode selector (Day/Night/Discreet)
- Bottom Left: Keyboard toggle
- Bottom Center: Microphone (tap to start recording, tap again to stop; auto-stops after 15 seconds)
- Bottom Right: Erase/Clear screen
Architecture
The app follows MVVM (Model-View-ViewModel) architecture for scalability and maintainability:
ClosedCaptioner/
โโโ Models/ # Data models
โ โโโ ColorMode.swift
โ โโโ CaptionText.swift
โโโ Services/ # Business logic
โ โโโ AudioService.swift
โ โโโ SpeechService.swift
โ โโโ EmojiService.swift
โ โโโ PickupLineService.swift
โ โโโ ShakeDetectionService.swift
โโโ ViewModels/ # UI state management
โ โโโ AppStateViewModel.swift
โโโ Views/ # UI components
โ โโโ ContentView.swift
โ โโโ CaptionTextDisplay.swift
โ โโโ ControlsView.swift
โ โโโ HistoryView.swift
โ โโโ KeyboardEditView.swift
โ โโโ DoneButton.swift
โโโ Controllers/ # Feature controllers
โ โโโ MicController.swift
โโโ Interfaces/ # Protocol definitions
โ โโโ MicControlProtocol.swift
โโโ Managers/ # Feature managers
โ โโโ HistoryManager.swift
โ โโโ ExportManager.swift
โโโ Assets.xcassets/ # Images and colors
Future Features (Architecture Ready)
- ๐ Multi-language Support: Support for multiple languages
- โ๏ธ Customization: Font sizes, colors, display options
- ๐ Analytics: Track transcription accuracy and usage
Setup
- Open the project in Xcode
- Build and run on an iOS device
- Grant microphone and speech recognition permissions when prompted
- App runs in portrait mode (optimized for vertical viewing)
Requirements
- iOS 16.4+
- iPhone or iPad
- Microphone access
- Speech recognition access
Technology Stack
- SwiftUI - Modern declarative UI framework
- AVFoundation - Audio processing and microphone access
- Speech - Speech recognition framework
- NaturalLanguage - Intelligent emoji detection and sentiment analysis
- CoreMotion - Accelerometer data for shake detection
- MVVM Architecture - Clean, testable, maintainable code
Development
The codebase is organized for:
- Easy feature additions
- Unit testing
- Code reusability
- Scalability
License
MIT