LazyAudioReaderSoundfile
Python template · sinapsis_data_readers.templates.audio_readers.audio_reader_soundfile
Overview
Reads audio data from a file path using Soundfile.
This class uses the Soundfile library to read audio data from a specified file path. It returns the audio data wrapped in an AudioPacket, which includes additional metadata such as sample rate and source information.
Capabilities
Capabilities: not setInstallation
Install the published package using pip or uv.
Terminalbash
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.
source
The source identifier, defaults to "streamlit".
str
Optional
Default: "f8beca0a-1ed4-4fd3-a751-cbbda0405dca"
Optional
Default: "f8beca0a-1ed4-4fd3-a751-cbbda0405dca"
metadata
sinapsis_core.template_base.base_models.TemplateMetadata | None
Optional
Default: null
Optional
Default: null
root_dir
str | None
Optional
Default: null
Optional
Default: null
generic_keyRequired
str
Required
Default: null
Required
Default: null
audio_file_path
Path to the audio file to be read.
str | None
Optional
Default: null
Optional
Default: null
Configuration example
Example from the Python docstring:
yaml
agent:
name: my_test_agent
templates:
- template_name: InputTemplate
class_name: InputTemplate
attributes: {}
- template_name: LazyAudioReaderSoundfile
class_name: LazyAudioReaderSoundfile
template_input: InputTemplate
attributes:
sample_rate_khz: 16
from_bytes: trueShow schema-based configuration skeleton
yaml
templates:
- template_name: "LazyAudioReaderSoundfile"
class_name: "LazyAudioReaderSoundfile"
attributes:
source: "f8beca0a-1ed4-4fd3-a751-cbbda0405dca"
root_dir: null
generic_key: "<required>"
audio_file_path: null
Inheritance
Immediate parent:
sinapsis_data_readers.templates.audio_readers.audio_reader_soundfile.AudioReaderSoundfileEnvironment variables
Environment definitions belong to their canonical Python modules.
No directly related environment variables listed.