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

In-process native CPU transcription backend used as the product-owned reference runtime. More...

#include <cpureferencetranscriber.h>

Public Member Functions

 CpuReferenceTranscriber (TranscriberConfig config, std::shared_ptr< const TranscriptionModelHandle > model)
 Creates a mutable native CPU session from a loaded model handle.
 
 CpuReferenceTranscriber (const CpuReferenceTranscriber &)=delete
 
CpuReferenceTranscriberoperator= (const CpuReferenceTranscriber &)=delete
 
 CpuReferenceTranscriber (CpuReferenceTranscriber &&)=delete
 
CpuReferenceTranscriberoperator= (CpuReferenceTranscriber &&)=delete
 
QString backendName () const override
 Returns the backend identifier for this live session.
 
bool warmup (RuntimeError *error=nullptr) override
 Performs optional backend warmup for this session.
 
TranscriptUpdate pushAudioChunk (const AudioChunk &chunk) override
 Ingests one normalized audio chunk into the live session.
 
TranscriptUpdate finish () override
 Flushes the current utterance and emits any final transcript events.
 
TranscriptUpdate cancel () override
 Requests cooperative cancellation of any active decode.
 
- Public Member Functions inherited from TranscriptionSession
 TranscriptionSession (const TranscriptionSession &)=delete
 
TranscriptionSessionoperator= (const TranscriptionSession &)=delete
 
 TranscriptionSession (TranscriptionSession &&)=delete
 
TranscriptionSessionoperator= (TranscriptionSession &&)=delete
 

Static Public Member Functions

static std::shared_ptr< const TranscriptionModelHandleloadModelHandle (const TranscriberConfig &config, RuntimeError *error=nullptr)
 Loads an immutable native CPU model handle from a validated package.
 
static std::unique_ptr< TranscriptionSessioncreateSession (TranscriberConfig config, std::shared_ptr< const TranscriptionModelHandle > model)
 Creates a mutable session from a generic app-owned model handle.
 
static QString backendNameStatic ()
 Returns the stable backend identifier used in diagnostics.
 
static BackendCapabilities capabilitiesStatic ()
 Returns static capability metadata for the native CPU runtime.
 
static RuntimeDiagnostics diagnosticsStatic ()
 Returns static runtime diagnostics for the native CPU runtime.
 

Detailed Description

In-process native CPU transcription backend used as the product-owned reference runtime.

The Phase 5 reference path is intentionally narrow and deterministic. It owns its model parsing, session state, and transcript emission without exposing any third-party runtime handles to the rest of the app.

Definition at line 23 of file cpureferencetranscriber.h.

Constructor & Destructor Documentation

◆ CpuReferenceTranscriber()

CpuReferenceTranscriber::CpuReferenceTranscriber ( TranscriberConfig  config,
std::shared_ptr< const TranscriptionModelHandle model 
)

Creates a mutable native CPU session from a loaded model handle.

Parameters
configRuntime configuration copied into the session.
modelShared immutable model handle created by the native CPU engine.

Member Function Documentation

◆ backendName()

QString CpuReferenceTranscriber::backendName ( ) const
overridevirtual

Returns the backend identifier for this live session.

Returns
Short backend name used for logs and diagnostics.

Implements TranscriptionSession.

◆ backendNameStatic()

static QString CpuReferenceTranscriber::backendNameStatic ( )
static

Returns the stable backend identifier used in diagnostics.

Returns
Product-owned backend name for the CPU reference runtime.

◆ cancel()

TranscriptUpdate CpuReferenceTranscriber::cancel ( )
overridevirtual

Requests cooperative cancellation of any active decode.

Implementations should stop in-flight backend work best-effort without using thread interruption.

Implements TranscriptionSession.

◆ capabilitiesStatic()

static BackendCapabilities CpuReferenceTranscriber::capabilitiesStatic ( )
static

Returns static capability metadata for the native CPU runtime.

Returns
Engine-owned capability snapshot.

◆ createSession()

static std::unique_ptr< TranscriptionSession > CpuReferenceTranscriber::createSession ( TranscriberConfig  config,
std::shared_ptr< const TranscriptionModelHandle model 
)
static

Creates a mutable session from a generic app-owned model handle.

Parameters
configRuntime configuration copied into the session.
modelShared immutable model handle.
Returns
Session on success, otherwise nullptr when the model type is incompatible.

◆ diagnosticsStatic()

static RuntimeDiagnostics CpuReferenceTranscriber::diagnosticsStatic ( )
static

Returns static runtime diagnostics for the native CPU runtime.

Returns
Engine-owned diagnostic description.

◆ finish()

TranscriptUpdate CpuReferenceTranscriber::finish ( )
overridevirtual

Flushes the current utterance and emits any final transcript events.

Returns
Final transcript events or a structured runtime failure.

Implements TranscriptionSession.

◆ loadModelHandle()

static std::shared_ptr< const TranscriptionModelHandle > CpuReferenceTranscriber::loadModelHandle ( const TranscriberConfig config,
RuntimeError error = nullptr 
)
static

Loads an immutable native CPU model handle from a validated package.

Parameters
configRuntime configuration copied into the handle.
errorOptional output for model validation or load failures.
Returns
Shared immutable model handle on success.

◆ pushAudioChunk()

TranscriptUpdate CpuReferenceTranscriber::pushAudioChunk ( const AudioChunk chunk)
overridevirtual

Ingests one normalized audio chunk into the live session.

Parameters
chunkProduct-owned normalized audio chunk.
Returns
Any transcript events emitted while ingesting the chunk.

Implements TranscriptionSession.

◆ warmup()

bool CpuReferenceTranscriber::warmup ( RuntimeError error = nullptr)
overridevirtual

Performs optional backend warmup for this session.

Parameters
errorOptional destination for a structured failure reason.
Returns
true if the session is ready for transcription, otherwise false.

Implements TranscriptionSession.


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