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

Mutable per-session transcription interface. More...

#include <transcriptionengine.h>

Public Member Functions

 TranscriptionSession (const TranscriptionSession &)=delete
 
TranscriptionSessionoperator= (const TranscriptionSession &)=delete
 
 TranscriptionSession (TranscriptionSession &&)=delete
 
TranscriptionSessionoperator= (TranscriptionSession &&)=delete
 
virtual QString backendName () const =0
 Returns the backend identifier for this live session.
 
virtual bool warmup (RuntimeError *error=nullptr)=0
 Performs optional backend warmup for this session.
 
virtual TranscriptUpdate pushAudioChunk (const AudioChunk &chunk)=0
 Ingests one normalized audio chunk into the live session.
 
virtual TranscriptUpdate finish ()=0
 Flushes the current utterance and emits any final transcript events.
 
virtual TranscriptUpdate cancel ()=0
 Requests cooperative cancellation of any active decode.
 

Detailed Description

Mutable per-session transcription interface.

Sessions own backend state that may be warmed up, reused, and kept isolated per thread or request flow.

Definition at line 58 of file transcriptionengine.h.

Member Function Documentation

◆ backendName()

virtual QString TranscriptionSession::backendName ( ) const
pure virtual

Returns the backend identifier for this live session.

Returns
Short backend name used for logs and diagnostics.

Implemented in CpuReferenceTranscriber, and WhisperCppTranscriber.

◆ cancel()

virtual TranscriptUpdate TranscriptionSession::cancel ( )
pure virtual

Requests cooperative cancellation of any active decode.

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

Implemented in CpuReferenceTranscriber, and WhisperCppTranscriber.

◆ finish()

virtual TranscriptUpdate TranscriptionSession::finish ( )
pure virtual

Flushes the current utterance and emits any final transcript events.

Returns
Final transcript events or a structured runtime failure.

Implemented in CpuReferenceTranscriber, and WhisperCppTranscriber.

◆ pushAudioChunk()

virtual TranscriptUpdate TranscriptionSession::pushAudioChunk ( const AudioChunk chunk)
pure virtual

Ingests one normalized audio chunk into the live session.

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

Implemented in CpuReferenceTranscriber, and WhisperCppTranscriber.

◆ warmup()

virtual bool TranscriptionSession::warmup ( RuntimeError error = nullptr)
pure virtual

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.

Implemented in CpuReferenceTranscriber, and WhisperCppTranscriber.


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