This guide provides detailed instructions for building VoiceInk from source.
Before you begin, ensure you have:
- macOS 14.4 or later
- Xcode (latest version recommended)
- Swift (latest version recommended)
- Git (for cloning repositories)
The easiest way to build VoiceInk is using the included Makefile, which automates the entire build process including building and linking the whisper framework.
# Clone the repository
git clone https://github.com/Beingpax/VoiceInk.git
cd VoiceInk
# Build everything (recommended for first-time setup)
make all
# Or for development (build and run)
make devmake checkormake healthcheck- Verify all required tools are installedmake whisper- Clone and build whisper.cpp XCFramework automaticallymake setup- Prepare the whisper framework for linkingmake build- Build the VoiceInk Xcode projectmake local- Build for local use (no Apple Developer certificate needed)make run- Launch the built VoiceInk appmake dev- Build and run (ideal for development workflow)make all- Complete build process (default)make clean- Remove build artifacts and dependenciesmake help- Show all available commands
The Makefile automatically:
- Manages Dependencies: Creates a dedicated
~/VoiceInk-Dependenciesdirectory for all external frameworks - Builds Whisper Framework: Clones whisper.cpp and builds the XCFramework with the correct configuration
- Handles Framework Linking: Sets up the whisper.xcframework in the proper location for Xcode to find
- Verifies Prerequisites: Checks that git, xcodebuild, and swift are installed before building
- Streamlines Development: Provides convenient shortcuts for common development tasks
This approach ensures consistent builds across different machines and eliminates manual framework setup errors.
If you don't have an Apple Developer certificate, use make local:
git clone https://github.com/Beingpax/VoiceInk.git
cd VoiceInk
make local
open ~/Downloads/VoiceInk.appThis builds VoiceInk with ad-hoc signing using a separate build configuration (LocalBuild.xcconfig) that requires no Apple Developer account.
The make local command uses:
LocalBuild.xcconfigto override signing and entitlements settingsVoiceInk.local.entitlements(stripped-down, no CloudKit/keychain groups)LOCAL_BUILDSwift compilation flag for conditional code paths
Your normal make all / make build commands are completely unaffected.
If you prefer to build manually or need more control over the build process, follow these steps:
- Clone and build whisper.cpp:
git clone https://github.com/ggerganov/whisper.cpp.git
cd whisper.cpp
./build-xcframework.shThis will create the XCFramework at build-apple/whisper.xcframework.
- Clone the VoiceInk repository:
git clone https://github.com/Beingpax/VoiceInk.git
cd VoiceInk-
Add the whisper.xcframework to your project:
- Drag and drop
../whisper.cpp/build-apple/whisper.xcframeworkinto the project navigator, or - Add it manually in the "Frameworks, Libraries, and Embedded Content" section of project settings
- Drag and drop
-
Build and Run
- Build the project using Cmd+B or Product > Build
- Run the project using Cmd+R or Product > Run
-
Xcode Configuration
- Ensure you have the latest Xcode version
- Install any required Xcode Command Line Tools
-
Dependencies
- The project uses whisper.cpp for transcription
- Ensure the whisper.xcframework is properly linked in your Xcode project
- Test the whisper.cpp installation independently before proceeding
-
Building for Development
- Use the Debug configuration for development
- Enable relevant debugging options in Xcode
-
Testing
- Run the test suite before making changes
- Ensure all tests pass after your modifications
If you encounter any build issues:
- Clean the build folder (Cmd+Shift+K)
- Clean the build cache (Cmd+Shift+K twice)
- Check Xcode and macOS versions
- Verify all dependencies are properly installed
- Make sure whisper.xcframework is properly built and linked
For more help, please check the issues section or create a new issue.