mutterkey
KDE-first push-to-talk transcription tool for KDE Plasma
Loading...
Searching...
No Matches
TranscriptionWorker Class Referencefinal

Thread-hosted wrapper around the configured transcription backend. More...

#include <transcriptionworker.h>

Signals

void transcriptionReady (const QString &text)
 Emitted when transcription succeeds.
 
void transcriptionFailed (const RuntimeError &error)
 Emitted when transcription fails.
 

Public Member Functions

 TranscriptionWorker (std::shared_ptr< const TranscriptionEngine > engine, QObject *parent=nullptr)
 Creates a worker with a shared immutable engine.
 
 TranscriptionWorker (std::unique_ptr< TranscriptionSession > transcriber, QObject *parent=nullptr)
 Creates a worker around an already-constructed session.
 
QString backendName () const
 Returns the active transcription backend name.
 
BackendCapabilities capabilities () const
 Returns the active runtime capability snapshot.
 
RuntimeDiagnostics runtimeDiagnostics () const
 Returns runtime diagnostics for the active backend instance.
 
bool warmup (RuntimeError *error=nullptr)
 Eagerly initializes backend state before the first real transcription.
 
void transcribeRecordingCompat (const Recording &recording)
 Transcribes a captured recording and emits a result signal.
 

Detailed Description

Thread-hosted wrapper around the configured transcription backend.

This QObject is intended to live on the service-owned transcription thread. It converts backend results into Qt signals that can be delivered back to the main-thread service object.

Definition at line 22 of file transcriptionworker.h.

Constructor & Destructor Documentation

◆ TranscriptionWorker() [1/2]

TranscriptionWorker::TranscriptionWorker ( std::shared_ptr< const TranscriptionEngine engine,
QObject *  parent = nullptr 
)
explicit

Creates a worker with a shared immutable engine.

Parameters
engineShared engine used to lazily create the live session.
parentOptional QObject parent.

◆ TranscriptionWorker() [2/2]

TranscriptionWorker::TranscriptionWorker ( std::unique_ptr< TranscriptionSession transcriber,
QObject *  parent = nullptr 
)
explicit

Creates a worker around an already-constructed session.

Parameters
transcriberOwned session implementation.
parentOptional QObject parent.

Member Function Documentation

◆ backendName()

QString TranscriptionWorker::backendName ( ) const

Returns the active transcription backend name.

Returns
Human-readable backend identifier.

◆ capabilities()

BackendCapabilities TranscriptionWorker::capabilities ( ) const

Returns the active runtime capability snapshot.

Returns
Capability data for diagnostics and orchestration decisions.

◆ runtimeDiagnostics()

RuntimeDiagnostics TranscriptionWorker::runtimeDiagnostics ( ) const

Returns runtime diagnostics for the active backend instance.

Returns
Runtime diagnostics snapshot including the loaded model description.

◆ transcribeRecordingCompat()

void TranscriptionWorker::transcribeRecordingCompat ( const Recording recording)

Transcribes a captured recording and emits a result signal.

Parameters
recordingCaptured audio payload to transcribe.

◆ transcriptionFailed

void TranscriptionWorker::transcriptionFailed ( const RuntimeError error)
signal

Emitted when transcription fails.

Parameters
errorStructured failure description.

◆ transcriptionReady

void TranscriptionWorker::transcriptionReady ( const QString &  text)
signal

Emitted when transcription succeeds.

Parameters
textFinal transcribed text.

◆ warmup()

bool TranscriptionWorker::warmup ( RuntimeError error = nullptr)

Eagerly initializes backend state before the first real transcription.

Parameters
errorOptional output for warmup failures.
Returns
true when the backend is ready for use.

The documentation for this class was generated from the following file: