mutterkey
KDE-first push-to-talk transcription tool for KDE Plasma
Loading...
Searching...
No Matches
AudioChunk Struct Reference

One normalized streaming audio unit passed into a transcription session. More...

#include <transcriptiontypes.h>

Public Member Functions

bool isValid () const
 Reports whether the chunk contains usable audio samples.
 

Public Attributes

std::vector< float > samples
 Mono float32 samples for this chunk.
 
int sampleRate = 16000
 Sample rate of the chunk payload.
 
int channels = 1
 Channel count of the chunk payload.
 
std::int64_t streamOffsetFrames = 0
 Start frame offset of this chunk within the utterance stream.
 

Detailed Description

One normalized streaming audio unit passed into a transcription session.

Definition at line 154 of file transcriptiontypes.h.

Member Function Documentation

◆ isValid()

bool AudioChunk::isValid ( ) const
inline

Reports whether the chunk contains usable audio samples.

Returns
true when at least one sample is present.

Definition at line 168 of file transcriptiontypes.h.

Member Data Documentation

◆ channels

int AudioChunk::channels = 1

Channel count of the chunk payload.

Definition at line 160 of file transcriptiontypes.h.

◆ sampleRate

int AudioChunk::sampleRate = 16000

Sample rate of the chunk payload.

Definition at line 158 of file transcriptiontypes.h.

◆ samples

std::vector<float> AudioChunk::samples

Mono float32 samples for this chunk.

Definition at line 156 of file transcriptiontypes.h.

◆ streamOffsetFrames

std::int64_t AudioChunk::streamOffsetFrames = 0

Start frame offset of this chunk within the utterance stream.

Definition at line 162 of file transcriptiontypes.h.


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