|
mutterkey
KDE-first push-to-talk transcription tool for KDE Plasma
|
In-process transcription backend backed by vendored whisper.cpp. More...
#include <whispercpptranscriber.h>
Public Member Functions | |
| WhisperCppTranscriber (TranscriberConfig config, std::shared_ptr< const TranscriptionModelHandle > model) | |
| Creates a mutable session from a loaded model handle. | |
| ~WhisperCppTranscriber () override | |
| Releases the owned whisper.cpp state. | |
| WhisperCppTranscriber (const WhisperCppTranscriber &)=delete | |
| WhisperCppTranscriber & | operator= (const WhisperCppTranscriber &)=delete |
| WhisperCppTranscriber (WhisperCppTranscriber &&)=delete | |
| WhisperCppTranscriber & | operator= (WhisperCppTranscriber &&)=delete |
| QString | backendName () const override |
| Returns the backend identifier for this live session. | |
| bool | warmup (RuntimeError *error=nullptr) override |
| Eagerly initializes the whisper.cpp context. | |
| TranscriptUpdate | pushAudioChunk (const AudioChunk &chunk) override |
| Appends one normalized chunk to the current utterance buffer. | |
| TranscriptUpdate | finish () override |
| Decodes the buffered utterance and emits final transcript events. | |
| TranscriptUpdate | cancel () override |
| Requests cooperative cancellation of active backend work. | |
Public Member Functions inherited from TranscriptionSession | |
| TranscriptionSession (const TranscriptionSession &)=delete | |
| TranscriptionSession & | operator= (const TranscriptionSession &)=delete |
| TranscriptionSession (TranscriptionSession &&)=delete | |
| TranscriptionSession & | operator= (TranscriptionSession &&)=delete |
Static Public Member Functions | |
| static std::shared_ptr< const TranscriptionModelHandle > | loadModelHandle (const TranscriberConfig &config, RuntimeError *error=nullptr) |
| Loads an immutable whisper.cpp model handle. | |
| static std::unique_ptr< TranscriptionSession > | createSession (TranscriberConfig config, std::shared_ptr< const TranscriptionModelHandle > model) |
| Creates a mutable session from a generic app-owned model handle. | |
| static QString | backendNameStatic () |
| Returns the backend name used in diagnostics. | |
| static BackendCapabilities | capabilitiesStatic () |
| Returns the static capability snapshot for the whisper.cpp runtime. | |
| static RuntimeDiagnostics | diagnosticsStatic () |
| Returns runtime diagnostics for the embedded whisper runtime. | |
In-process transcription backend backed by vendored whisper.cpp.
The backend lazily initializes its whisper_context and keeps ownership in a RAII-managed smart pointer so service shutdown and worker teardown stay deterministic.
Definition at line 27 of file whispercpptranscriber.h.
| WhisperCppTranscriber::WhisperCppTranscriber | ( | TranscriberConfig | config, |
| std::shared_ptr< const TranscriptionModelHandle > | model | ||
| ) |
Creates a mutable session from a loaded model handle.
| config | Whisper settings copied into the session. |
| model | Shared immutable model handle. |
|
overridevirtual |
Returns the backend identifier for this live session.
Implements TranscriptionSession.
|
static |
Returns the backend name used in diagnostics.
|
overridevirtual |
Requests cooperative cancellation of active backend work.
Implements TranscriptionSession.
|
static |
Returns the static capability snapshot for the whisper.cpp runtime.
|
static |
Creates a mutable session from a generic app-owned model handle.
| config | Whisper settings copied into the session. |
| model | Shared immutable model handle. |
nullptr when the model is not a whisper handle.
|
static |
Returns runtime diagnostics for the embedded whisper runtime.
|
overridevirtual |
Decodes the buffered utterance and emits final transcript events.
Implements TranscriptionSession.
|
static |
Loads an immutable whisper.cpp model handle.
| config | Whisper settings copied into the handle. |
| error | Optional output for model validation or load failures. |
|
overridevirtual |
Appends one normalized chunk to the current utterance buffer.
| chunk | Product-owned normalized audio chunk. |
Implements TranscriptionSession.
|
overridevirtual |
Eagerly initializes the whisper.cpp context.
| error | Optional output for initialization failures. |
true when the backend is ready for transcription. Implements TranscriptionSession.