Run real-time voice + lip-synced avatar inside a Mac app. All inference runs on the device’s GPU and Neural Engine; the only network use is the first-launch weights download and (for the avatar engine) a 1-request-per-minute billing heartbeat.Documentation Index
Fetch the complete documentation index at: https://docs.bithuman.ai/llms.txt
Use this file to discover all available pages before exploring further.
Prerequisites
- macOS 26 (Tahoe) or later
- Apple Silicon Mac (M3 or newer)
- Xcode 26+
- ~3 GB free disk for first-launch model downloads
- A
BITHUMAN_API_KEYif you’ll use the avatar engine (audio-only mode is unmetered and doesn’t need a key — see Get an API key)
Add the package
In Xcode: File → Add Package Dependencies →Package.swift:
bitHumanKit. import bitHumanKit and
you’re in.
Boot a voice agent
~/.cache/huggingface/hub/; subsequent launches are instant.
Get an API key
The avatar pipeline is metered (2 credits/min) and requires a bitHuman developer key. Audio-only mode is free and unmetered — this section only matters if you plan to use the avatar.- Sign in at https://www.bithuman.ai → Developer → API Keys.
- Either set
config.apiKeydirectly OR exportBITHUMAN_API_KEYin the launching environment. The SDK resolves them in that order. - The first heartbeat happens at
chat.start()— bad keys throwVoiceChatError.authenticationFailedimmediately, before any user-visible work. 5-minute offline grace once authenticated.
Add the lip-synced avatar
renderer in your SwiftUI tree:
ExpressionWeights.ensureAvailable() downloads
the universal weights bundle (~1.6 GB) to
~/.cache/bithuman/expression/. SHA-256 verified; cached.
Permissions
Mac apps need:- Microphone — System Settings prompts on first
chat.start(). - Speech Recognition — Same.
Info.plist:
Distribution
Mac apps consuming bitHumanKit ship via the standard channels:- Direct DMG with Sparkle auto-update (the bitHuman Mac reference app uses this; see bithuman-apps/Mac).
- Mac App Store — same app, archived through Xcode.
- Homebrew Cask — for CLI / dev tools (see bithuman-cli for the canonical example).
Reference apps
- bithuman-mac — full Mac app with floating avatar window, agent picker, voice gallery, drag-drop face swap, Sparkle DMG packaging. Annotated source designed to be cloned and adapted.
- bithuman-cli — same SDK, CLI shell. Three modes
(text / voice / video). Source at
available via Homebrew (
brew install bithuman-cli).
Troubleshooting
See the dedicated Troubleshooting page. The most common Mac-specific issues:- App freezes on first launch — first run downloads ~3 GB of
models. Add a progress UI hook via
ExpressionWeights.ensureAvailable(progress:). - Microphone permission denied silently — your app isn’t
sandboxed AND doesn’t include the entitlement. Either sandbox
- entitle, or add
NSMicrophoneUsageDescriptionto Info.plist.
- entitle, or add
unsupportedHardwarethrown on M2 — the engine refuses pre-M3 silicon. There’s no override; the silicon doesn’t have the bandwidth.
Next
- iOS / iPadOS deployment
- Cookbook — copy-paste recipes
- API reference — DocC, every public type
- bithuman-cli — what you can do without writing code
