AudioPcmFrame

The parameters of the audio frame in PCM format.

class AudioPcmFrame {
  const AudioPcmFrame(
      {this.captureTimestamp,
      this.samplesPerChannel,
      this.sampleRateHz,
      this.numChannels,
      this.bytesPerSample,
      this.data});

  @JsonKey(name: 'capture_timestamp')
  final int? captureTimestamp;

  @JsonKey(name: 'samples_per_channel_')
  final int? samplesPerChannel;

  @JsonKey(name: 'sample_rate_hz_')
  final int? sampleRateHz;

  @JsonKey(name: 'num_channels_')
  final int? numChannels;

  @JsonKey(name: 'bytes_per_sample')
  final BytesPerSample? bytesPerSample;

  @JsonKey(name: 'data_')
  final List<int>? data;

  factory AudioPcmFrame.fromJson(Map<String, dynamic> json) =>
      _$AudioPcmFrameFromJson(json);

  Map<String, dynamic> toJson() => _$AudioPcmFrameToJson(this);
}

Attributes

captureTimestamp
The timestamp (ms) of the audio frame.
samplesPerChannel
The number of samples per channel in the audio frame.
sampleRateHz
Audio sample rate (Hz).
numChannels
The number of audio channels.
bytesPerSample
The number of bytes per sample.
data
The audio frame.