RFC: Vocalinux Technology Stack Analysis & Porting Recommendations #417
jatinkrmalik
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
RFC: Vocalinux Technology Stack Analysis & Porting Recommendations
TL;DR
After auditing the Vocalinux codebase (~13,800 lines Python) and researching the Linux desktop ecosystem, I propose a tiered modernization roadmap:
Not recommended: Dropping everything for a full Rust rewrite immediately.
Background
Vocalinux is a mature Python/GTK3 voice dictation app with:
The codebase is well-architected. The question is where to invest next.
Key Findings
1. GTK3 is maintenance-only
GTK3 receives only crash/build fixes. New platform features (GPU rendering, fractional scaling, modern dialogs) are GTK4-only. PyGObject 3.55 (Nov 2025) fully supports GTK4.
Migration complexity: Medium-High. Not a drop-in upgrade. Major changes:
StatusNotifierItem(biggest blocker)Gtk.Dialog+Gtk.Notebook→Adw.PreferencesDialogRecommended strategy: Gaphor's "keep the shop open" — parallel GTK3/GTK4 branches, ship from GTK3 while GTK4 matures.
2. Wayland support exists but is fragile
Vocalinux already supports Wayland via a sophisticated fallback chain:
wtype(GNOME/Sway with virtual-keyboard protocol)ydotool(universal but needs daemon + uinput)The problem: Each backend has compositor-specific gaps. No single path works everywhere. And none are Flatpak-safe.
Upgrade path:
libei+ RemoteDesktop portal. This is the official Wayland-native replacement for XTEST. Works on GNOME 46+ and KDE Plasma 6. User-approved via permission dialog. Flatpak-safe.3. Python's GIL is a risk, not a showstopper
The GIL serializes audio orchestration (capture → VAD → transcription → injection).
pywhispercppand NumPy release the GIL during C++ execution, but Python-level queue management is serialized.Honest framing: Vocalinux works today. The GIL becomes a problem under sustained load or with larger models. It is a scalability ceiling, not a current failure.
4. Distribution is the biggest gap
No Flatpak, AppImage, deb, rpm, or AUR packages exist. The bash install script is robust but a barrier to adoption.
Flatpak is the clear winner: 438M downloads on Flathub (2025), cross-distro, GNOME runtime bundles GTK3 + Python.
Proposed Roadmap
Phase 1: Flatpak + Wayland Robustness (Months 1–2)
Goal: Get Vocalinux into users' hands.
com.vocalinux.app.yml)libei/RemoteDesktop portal backend for Flatpak-safe Wayland injectionEffort: 2–3 months
Risk: Low
Impact: Highest
Phase 2: GTK4 Migration (Months 3–5, parallel)
Goal: Future-proof the UI.
gtk4branch, keepmainon GTK3trayer(PyPI) or D-Bus SNIAdw.PreferencesDialogEffort: 2–3 months
Risk: Medium
Impact: High
Phase 3: Hybrid Rust Core (Months 6–9, optional)
Goal: Fix GIL jitter without full UI rewrite.
cpal+whisper-rs)libei+wtype+ clipboard)Effort: 2–3 months
Risk: Medium
Impact: Medium-High
Phase 4: Full Rust Rewrite (Year 2+, optional)
Goal: Maximum performance, single-binary distribution.
gtk4-rs+libadwaita-rsEffort: 6–12 months
Risk: High
Impact: High (but diminishing returns after Phase 3)
Alternatives Considered
Open Questions
libeiportal becomes higher priority.Call for Feedback
This is a starting point for discussion, not a mandate. I'd especially like feedback on:
libei/RemoteDesktop portalAll reactions