View source on GitHub |
A container for the input audio tensor metadata information.
Inherits From: TensorMd
tflite_support.metadata_writers.metadata_info.InputAudioTensorMd(
name: Optional[str] = None,
description: Optional[str] = None,
sample_rate: int = 0,
channels: int = 0
)
Args | |
---|---|
name
|
name of the tensor. |
description
|
description of what the tensor is. |
sample_rate
|
the sample rate in Hz when the audio was captured. |
channels
|
the channel count of the audio. |
Attributes | |
---|---|
sample_rate
|
the sample rate in Hz when the audio was captured. |
channels
|
the channel count of the audio. |
Methods
create_metadata
create_metadata() -> tflite_support.metadata_schema_py_generated.TensorMetadataT
Creates the input audio metadata based on the information.
Returns | |
---|---|
A Flatbuffers Python object of the input audio metadata. |
Raises | |
---|---|
ValueError
|
if any value of sample_rate, channels is negative. |