Conversation
Adds a complete iOS app (MiniFlow_iOS) with a custom keyboard extension that enables voice-to-text dictation in any app, powered by Smallest AI's Waves real-time streaming STT API. Architecture: - Main app runs AVAudioEngine in the background, streams 16kHz mono PCM audio directly to Smallest AI via WebSocket (no Python engine needed) - Keyboard extension communicates with the main app via App Group shared container (file-based IPC for reliability) - Keyboard sends start/stop/cancel commands, main app writes transcripts - Live partial transcripts stream to keyboard during recording - Final transcript inserted at cursor with smart spacing Key files: - SmallestAIClient.swift: WebSocket client for Smallest AI Waves API - FlowBackgroundRecorder.swift: Background audio capture + streaming - FlowSessionManager.swift: File-based IPC between app and keyboard - KeychainHelper.swift: Secure API key storage - KeyboardViewController.swift: Keyboard extension with state machine - VoiceInputView.swift: Keyboard UI with record button and controls - ContentView.swift: Main app settings (API key, session, permissions) Features: - Hold-to-record or tap-to-toggle in keyboard - Real-time partial transcript display during recording - Auto-scrolling live text preview - Smart text insertion (space-aware, punctuation-aware) - Undo support (20-second window) - Dark mode support - URL scheme (miniflow://startflow) for keyboard-to-app launch - Heartbeat-based session liveness detection
EntelligenceAI PR SummaryIntroduces the full MiniFlow iOS application — a voice transcription tool using a custom keyboard extension and background audio recording service connected to Smallest AI's STT WebSocket API.
Confidence Score: 3/5 - Review RecommendedLikely safe but review recommended — this PR introduces a substantial new iOS application including Key Findings:
Files requiring special attention
|
iOS app + keyboard extension that brings MiniFlow dictation to any iOS app.
The macOS app routes audio through a Python backend to Smallest AI. On iOS there's no local server, so the app talks to the Waves WebSocket API directly from Swift — same 16kHz PCM streaming, same
is_final/is_lastprotocol, just no middleman.How it works
The main app runs AVAudioEngine in the background. The keyboard extension sends commands (start/stop/cancel) via files in the App Group shared container. When the user taps record, the app opens a WebSocket to
wss://api.smallest.ai/waves/v1/pulse/get_text, streams PCM chunks from the mic, and writes the transcript back to the shared container. The keyboard reads it and inserts at the cursor.File-based IPC instead of UserDefaults because UserDefaults is unreliable between app and extension on device (the
kCFPreferencesAnyUserissue).What's in the PR
SmallestAIClient.swift— actor wrappingURLSessionWebSocketTask, handles the Waves protocolFlowBackgroundRecorder.swift— AVAudioEngine capture, PCM conversion, streams to SmallestAIClientFlowSessionManager.swift— reads/writes small files in the App Group container for IPCKeyboardViewController.swift— UIInputViewController hosting SwiftUI, state machine for the recording flowVoiceInputView.swift— keyboard UIContentView.swift— main app: API key entry, session control, setup instructionsKeychainHelper.swift— thin Security.framework wrapper for storing the API keySetup
After cloning, add App Group
group.com.smallestai.MiniFlowto both targets in Signing & Capabilities (Xcode doesn't persist this across machines). Then build, enter your API key, enable the keyboard in iOS Settings, and go.No macOS files were modified.