Skip to content

Repository files navigation

Talka

Talka is a lightweight macOS assistant for small daily tasks. It starts as a shortcut-invoked translator with text-to-speech, then grows into contextual actions such as summarizing a page, saving an idea, creating a reminder, and extracting meeting action items.

The product should feel like an action layer over the user's current work, not another chat app.

MVP

  • Select text anywhere on macOS.
  • Press the configured global shortcut.
  • Translate the selected text using the configured LLM provider.
  • Show the result in a small floating panel.
  • Speak the source or translated text with Qwen TTS when DashScope is configured, falling back to native macOS TTS.
  • Configure shortcut, default languages, provider, model, and voice.
  • Use smart target language so Auto -> Chinese translates Chinese input to a fallback target such as English.
  • Use Round Trip to translate the current result back toward the original input language for smoother wording.
  • Use Rewrite to polish text in the same language without translating it.
  • Use Explain to understand meanings, usage, examples, tone, and grammar in more detail than Translate.
  • Optionally save local history for successful actions. History is off by default and stored only on this Mac.
  • Generate local flashcards from yesterday or the recent 7 days of saved translation history, then review them as four-option meaning quizzes.

Run Locally

Talka is currently a SwiftPM macOS menu-bar app.

swift run Talka

The app loads Qwen/DashScope settings from .env:

DASHSCOPE_BASHE_URL=https://dashscope.aliyuncs.com/compatible-mode/v1
DASHSCOPE_API_KEY=...
DASHSCOPE_DEFAULT_MODEL=qwen3.7-max

DASHSCOPE_BASE_URL is also supported. Either the API root ending in /v1 or the full /chat/completions endpoint works.

When launched as a bundled app with open dist/Talka.app, configure the LLM provider from the Talka settings window. The API key, base URL, and model are saved together in app preferences. If the key is missing, Talka opens the settings window automatically. If provider settings are configured, Talka opens the main panel on launch.

The Speak button uses DashScope qwen3-tts-flash with the configured hosted voice, defaulting to Jennifer, when the provider URL is a DashScope host. If cloud TTS fails or the provider is not configured, Talka uses native macOS speech.

Run deterministic core checks:

swift run TalkaCoreChecks

Run a live Qwen smoke check:

swift run TalkaSmoke translate "你好,今天会议三点开始。"
swift run TalkaSmoke summarize "Alice will send notes. Bob should book the room."

Build a local app bundle:

scripts/build_app_bundle.sh
open dist/Talka.app

Talka is a regular macOS app, so it appears in Dock and Cmd+Tab while it is running. It still keeps the menu-bar entry for quick access.

For selected webpage translation, select text in Safari or Chrome and press the configured shortcut, defaulting to Cmd+K. Talka copies the browser selection before showing its panel, restores the clipboard, then translates the captured text.

Smart target language is enabled by default. For example, with Source Auto, Target Chinese, and Fallback English, English or Spanish input translates to Chinese, while Chinese input translates to English. Explicit source settings do not reverse automatically.

After a translation succeeds, Round Trip translates the current result back toward the original input language. This is useful for smoothing the original wording or checking whether meaning survived the translation. Talka keeps the original text only in memory for the current panel state.

Auto translate can be enabled in Settings. It is off by default. When enabled, Talka watches for likely selection changes, waits for the configured debounce, captures changed selected text with simulated copy, ignores repeated or overly long selections, and translates the result with the configured LLM provider.

History can be enabled in Settings. When enabled, successful actions are saved locally under the app's Application Support directory with input, output, action, direction, provider, model, and timestamp. History can be opened from the menu bar or panel, copied, loaded, rerun, deleted item-by-item, or cleared.

Flashcards can be opened from the menu bar or History window. Talka uses the configured LLM only after the user clicks Generate from Yesterday or Generate from 7 Days. Generated cards stay local in the same SQLite store as history. Review shows four target-language meanings; wrong choices are disabled until the user finds the correct answer or asks to reveal it.

The menu-bar Translate Selection command reactivates the last regular app before copying, so it can capture the browser selection even after opening the Talka status item. If macOS does not allow focus restoration, Talka falls back to the current clipboard text for menu-triggered translation.

The build script creates and reuses a local code-signing identity under .talka-signing/ so macOS Accessibility permission can survive rebuilds. To use another signing identity:

security find-identity -v -p codesigning
TALKA_CODESIGN_IDENTITY="Apple Development: Your Name (...)" scripts/build_app_bundle.sh

Launch the bundle with open; direct terminal execution of dist/Talka.app/Contents/MacOS/Talka can hit LaunchServices registration behavior that does not occur during normal app launch.

Documentation

Validation

python3 scripts/validate.py quick
python3 scripts/validate.py full

About

Shortcut-first AI assistant for small daily tasks on macOS and iOS

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages