41 std::shared_ptr<const TranscriptionEngine> transcriptionEngine,
42 QClipboard *clipboard,
43 QObject *parent =
nullptr);
57 bool
start(QString *errorMessage =
nullptr);
94 void onShortcutPressed();
99 void onShortcutReleased();
105 void onTranscriptionReady(const QString &text);
119 bool startTranscriptionWorker(QString *errorMessage =
nullptr);
124 void stopTranscriptionWorker();
130 void transcribeInBackground(
Recording recording);
143 QThread m_transcriptionThread;
147 bool m_running = false;
149 int m_recordingsStarted = 0;
151 int m_recordingsCompleted = 0;
153 int m_transcriptionsCompleted = 0;
Audio capture primitives for push-to-talk recording.
Captures microphone audio into a Recording value object.
Copies transcription text to the clipboard.
Wraps KGlobalAccel registration for Mutterkey's push-to-talk shortcut.
Coordinates the daemon-mode push-to-talk workflow.
MutterkeyService(const AppConfig &config, std::shared_ptr< const TranscriptionEngine > transcriptionEngine, QClipboard *clipboard, QObject *parent=nullptr)
Creates the service with a fixed runtime configuration.
bool start(QString *errorMessage=nullptr)
Starts the hotkey, worker thread, and optional backend warmup.
void transcriptionFailed(const RuntimeError &error)
Emitted when recording or transcription fails.
void stop()
Stops recording, hotkey registration, and background transcription.
QJsonObject diagnostics() const
Returns current service diagnostics for diagnose mode.
~MutterkeyService() override
Stops background work and joins the transcription thread.
bool invokeShortcut(QString *errorMessage=nullptr)
Invokes the registered shortcut action for diagnostics.
void transcriptionReady(const QString &text)
Emitted when a transcription result has been copied successfully.
Immutable engine configuration that creates backend sessions.
Thread-hosted wrapper around the configured transcription backend.
Clipboard integration with KDE-first and Qt fallback behavior.
Runtime configuration types, defaults, and JSON loading entrypoints.
KDE global shortcut registration and activation tracking.
Top-level runtime configuration snapshot.
Immutable-style value object holding one captured audio segment.
Structured runtime-layer failure with user-facing and diagnostic text.
Background worker object that performs transcription on a dedicated thread.