LazyAudioReaderPydub
Python template · sinapsis_data_readers.templates.audio_readers.audio_reader_pydub
Overview
Reads an audio file using Pydub, obtaining the file path from the generic_field of the DataContainer and setting is as the file_path in the attributes.
Capabilities
Capabilities: not setInstallation
Install the published package using pip or uv.
pip install sinapsis-data-readers==1.0.0uv pip install sinapsis-data-readers==1.0.0uv add sinapsis-data-readers==1.0.0Configuration
Effective fields from the inspector schema, including nested Pydantic model fields.
Optional
Default: "f8beca0a-1ed4-4fd3-a751-cbbda0405dca"
Optional
Default: null
Optional
Default: null
Flag to determine if the file is in bytes. Defaults to True. audio_reader_format (Literal["wav", "raw", "pcm"] | None) Format of the source audio file, if not provided will be automatically detected. Defaults to None.
Optional
Default: false
Required
Default: null
Optional
Default: null
Sample rate in khz for the processed audio. Defaults to 16hkz.
Optional
Default: 16
Optional
Default: null
Configuration example
Example from the Python docstring:
agent:
name: my_test_agent
templates:
- template_name: InputTemplate
class_name: InputTemplate
attributes: {}
- template_name: LazyAudioReaderPydub
class_name: LazyAudioReaderPydub
template_input: InputTemplate
attributes:
sample_rate_khz: 16
from_bytes: FalseShow schema-based configuration skeleton
templates:
- template_name: "LazyAudioReaderPydub"
class_name: "LazyAudioReaderPydub"
attributes:
source: "f8beca0a-1ed4-4fd3-a751-cbbda0405dca"
root_dir: null
from_bytes: false
generic_key: "<required>"
audio_file_path: null
sample_rate_khz: 16
audio_reader_format: null
Inheritance
sinapsis_data_readers.templates.audio_readers.audio_reader_pydub.AudioReaderPydubEnvironment variables
Environment definitions belong to their canonical Python modules.
No directly related environment variables listed.