|
mutterkey
KDE-first push-to-talk transcription tool for KDE Plasma
|
Captures microphone audio into a Recording value object.
More...
#include <audiorecorder.h>
Public Member Functions | |
| AudioRecorder (AudioConfig config, QObject *parent=nullptr) | |
| Creates a recorder with a fixed audio configuration snapshot. | |
| bool | start (QString *errorMessage=nullptr) |
| Starts audio capture on the resolved input device. | |
| Recording | stop () |
| Stops capture and returns the recorded payload and format metadata. | |
| bool | isRecording () const |
| Reports whether microphone capture is currently active. | |
Captures microphone audio into a Recording value object.
The recorder owns the active QAudioSource while recording. The returned Recording preserves the device-selected format so later normalization can convert it into Whisper's required mono 16 kHz float input.
Definition at line 87 of file audiorecorder.h.
|
explicit |
Creates a recorder with a fixed audio configuration snapshot.
| config | Audio capture preferences copied into the recorder. |
| parent | Optional QObject parent. |
| bool AudioRecorder::isRecording | ( | ) | const |
Reports whether microphone capture is currently active.
true when a QAudioSource is running. | bool AudioRecorder::start | ( | QString * | errorMessage = nullptr | ) |
Starts audio capture on the resolved input device.
| errorMessage | Optional output for startup failures. |
true when capture started successfully. | Recording AudioRecorder::stop | ( | ) |
Stops capture and returns the recorded payload and format metadata.