I tried to build a simple macOS app using F5 TTS MLX (a text-to-speech model optimized for Apple’s ML acceleration framework) for voice cloning, thinking it would be a quick evening project. After exploring BeeWare, Kivy, and Flet, here’s what I learned.
TL;DR: None of the Python GUI frameworks fully met my needs. BeeWare had the best developer experience, Flet had the nicest UI, but I’ll likely continue with a native Swift app calling (Python?) executables, lots of potential for someone like https://astral.sh/ (creators of modern Python tooling like Ruff and uv)!
My ranking is probably Native>BeeWare>Flet>>Kivy. Want to explore pure Flutter (Google’s UI toolkit for building natively compiled apps) too.
Project Goal
A simple voice cloning app where you can enter text, attach WAV files with voice samples (or use yt-dlp (a feature-rich YouTube video downloader) to extract them), and generate speech in the cloned voice.
BeeWare
“Write once. Deploy everywhere.” BeeWare lets you write native, cross-platform GUI applications in Python using platform-native widgets, so your apps look and feel at home on each platform.
Following the official tutorial, I created this:
The developer experience with briefcase (BeeWare’s packaging tool) was excellent, very nice briefcase dev
, briefcase create
commands reminded me of flutter, but their Toga UI framework (BeeWare’s native widget toolkit) lacks audio widgets. I can see myself working with it if adding audio is not a big problem.
Flet
“Flutter-inspired framework for Python.” Flet enables you to easily build realtime web, mobile and desktop apps in Python. It’s a newcomer winning developers over with modern UI components and rapid development.
Using the official guide, I built this web interface:
The UI looks significantly better, but the macOS deployment docs are sparse. Good for web, not ideal for desktop. I also really didn’t like the coding style they have, page.add
and functions defined inside of other functions, I’m thinking coding with pure flutter and bundling python can be a better choice.
Kivy
“Open source Python library for rapid development of applications that make use of innovative user interfaces.” Kivy runs on multiple platforms and provides its own widget toolkit.
Started with the basic tutorial:
The framework feels dated, and I hit dependency conflicts between KivyMD (Kivy’s Material Design components), uv (a new, extremely fast Python package installer), and F5 TTS MLX.
Native Swift
For Python integration with Swift (Apple’s modern programming language for iOS and macOS), I’m considering:
- Briefcase: “The BeeWare build tool for converting Python projects into standalone apps”
- PEX: “A library for generating .pex (Python EXecutable) files which are self-contained Python environments”
- Nuitka: “Python compiler that creates standalone executables by converting Python code to C”
- PyApp: “Simple Python application dependency manager and runner that creates standalone executables”
My current direction (I barely wrote anything with swift before):
Finally got working audio playback! However, Xcode feels restrictive after VSCode, and I encountered an EXC_BREAKPOINT error with NSSavePanel that couldn’t figure out. Also as I’m using MLX (Apple’s machine learning framework) anyway, maybe it’s easier to rewrite python-mlx bindings into a swift-mlx? Haven’t dived deeper into it yet.