Skip to content

Repository files navigation

MFlow

Voice to text for macOS. MFlow is a small menu-bar app that lets you talk instead of type. Hold a hotkey, speak, and release — your words are transcribed and typed into whatever app you're currently using (built with VS Code in mind).

Transcription uses Apple's Speech framework, and the resulting text is delivered to the focused app as synthesized keyboard input.

Getting Started

  1. Install: open MFlow.dmg, then drag MFlow.app into your Applications folder.
  2. Launch: double-click MFlow.app. A microphone icon appears in the menu bar (top-right of your screen) — the app has no dock icon or window, it lives in the menu bar.
  3. Grant permissions: the first time you use it, macOS will ask for Microphone, Speech Recognition, and Accessibility access. Click "Open Settings" in each prompt and turn the switch on for MFlow, then quit and reopen the app. See Required permissions below for details.
  4. Talk: click into any text field (e.g. a file in VS Code), hold down the hotkey (default: Option + Z), speak, then release the hotkey. The menu-bar icon shows "Listening" while recording. Your transcribed text is typed in automatically after you release.
  5. Change the hotkey (optional): click the menu-bar icon > "Hotkey Settings…" if you'd like a different key combination. See Changing the hotkey below.
  6. Quit: click the menu-bar icon > "Quit".

Current status

  • Menu-bar app entry point
  • Microphone and speech-recognition permission requests
  • Hold-and-release hotkey flow for start/stop listening (default: Option + Z, customizable via "Hotkey Settings…" in the menu)
  • Transcript typed into the active app as synthesized keyboard input
  • DMG packaging with a custom app icon

Build

cd /path/to/mflow
swift build

Run

The app must run from a bundle — a bare swift run binary has no Info.plist, so macOS kills it the moment it touches the microphone. Build the bundle and launch that:

make release
open build/release/MFlow.app

Package as a DMG

cd /path/to/mflow
make dmg

This builds a release binary, assembles build/release/MFlow.app, and produces build/release/MFlow.dmg.

Changing the hotkey

Click the menu-bar icon > "Hotkey Settings…" > "Record New Hotkey", then press the desired key combination (must include Control, Option, Command, or Shift). Press Esc to cancel. The new hotkey takes effect immediately.

Notes

  • The first version targets English speech.
  • Text is inserted as synthesized Unicode keyboard events, so it does not touch your clipboard.

Required permissions

Enable these in System Settings > Privacy & Security before using the app:

  • Accessibility — required to type the transcribed text into other apps. The hotkey itself does not need it: it is registered with the Carbon hotkey API, which also means the key press is consumed rather than passed through to the app you are typing in.
  • Microphone — required to capture your voice.
  • Speech Recognition — required to transcribe captured audio into text.

After enabling any of these, fully quit and reopen MFlow so the new permissions take effect.

Why permissions can be revoked after a rebuild

macOS ties Accessibility grants to the app's code signature. make release ad-hoc signs the bundle by default, and ad-hoc signatures change on every rebuild, so previously granted permissions are silently revoked and need re-enabling.

To keep permissions across rebuilds, create a self-signed code-signing certificate (Keychain Access > Certificate Assistant > Create a Certificate…, type "Code Signing") and build with it:

make dmg SIGN_IDENTITY="MFlow Self Signed"

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages