A minimal SwiftUI macOS app demonstrating the Qwen3 Speech library: mic recording with ASR transcription and text-to-speech synthesis with playback.
- macOS 15+ (Sequoia)
- Apple Silicon (M1 or later)
- Xcode 16+
- Open
Examples/SpeechDemo/in Xcode (File > Open, select this folder) - Xcode resolves the SPM dependency on the parent
Qwen3Speechpackage automatically - Select the
SpeechDemoscheme and press Run
If running from an Xcode project, add these entitlements to the signing config:
com.apple.security.app-sandbox— required for App Sandboxcom.apple.security.device.audio-input— microphone access for recordingcom.apple.security.network.client— outbound network for model downloads
The entitlements file is provided at SpeechDemo/SpeechDemo.entitlements.
cd Examples/SpeechDemo
swift buildNote: The command-line build produces an executable, not a sandboxed .app bundle. Microphone access requires running from Xcode with proper entitlements, or granting Terminal microphone permission in System Settings > Privacy & Security > Microphone.
The app has three tabs:
- Select an ASR engine: Parakeet TDT (CoreML, ~400 MB) or Qwen3-ASR (MLX, ~400 MB)
- Click Load to download the model (first run only — cached in
~/Library/Caches/qwen3-speech/) - Hold the Record button, speak, then release
- The transcription appears below — click Copy to copy to clipboard
- Click Load Qwen3-TTS to download the model (~1 GB, first run only)
- Type or paste text into the text field
- Select a language from the dropdown
- Click Synthesize — audio plays automatically when ready
- Click Load Models — downloads Silero VAD (CoreML), Parakeet TDT (CoreML), and Qwen3-TTS (MLX)
- Click Start to begin the voice pipeline
- Speak into the mic — the pipeline detects speech, transcribes it, and speaks it back
- Full-duplex: you can interrupt the agent while it's speaking (barge-in)
- Click Stop to end the session
The Echo tab uses the SpeechCore voice pipeline with AEC (acoustic echo cancellation) for full-duplex operation.
| Model | Size | Cache location |
|---|---|---|
| Parakeet TDT (CoreML INT8) | ~500 MB | ~/Library/Caches/qwen3-speech/aufklarer_Parakeet-TDT-v3-CoreML-INT8/ |
| Qwen3-ASR (MLX 4-bit) | ~400 MB | ~/Library/Caches/qwen3-speech/aufklarer_Qwen3-ASR-0.6B-MLX-4bit/ |
| Qwen3-TTS (MLX 4-bit) | ~1 GB | ~/Library/Caches/qwen3-speech/aufklarer_Qwen3-TTS-12Hz-0.6B-Base-MLX-4bit/ |
| Qwen3-TTS Tokenizer | ~650 MB | ~/Library/Caches/qwen3-speech/Qwen_Qwen3-TTS-Tokenizer-12Hz/ |
| Silero VAD v6.2.1 (CoreML) | ~1.2 MB | ~/Library/Caches/qwen3-speech/ |