Docs /Templates/ sinapsis-data-readers

ExecuteNTimesLazyAudioReaderPydub

sinapsis-data-readerscommunityaudioreaderspydubsoundfile

Python template · sinapsis_data_readers.templates.audio_readers.audio_reader_pydub

Overview

This template provides functionality to read multiple audios, each of them assigned to its own DataContainer and to its own reader process. Similar to its base class, it reads the file path from the generic field of the DataContainer, n_times_execute determines the number of times the template's execute method is called. By default, it only gets called once. Further calls to execute are bypassed.

Capabilities

Capabilities: not set

Installation

Install the published package using pip or uv.

Terminalbash
pip install sinapsis-data-readers==1.0.0
uv pip install sinapsis-data-readers==1.0.0
uv add sinapsis-data-readers==1.0.0

Configuration

Effective fields from the inspector schema, including nested Pydantic model fields.

source
str
Optional
Default: "f8beca0a-1ed4-4fd3-a751-cbbda0405dca"
metadata
sinapsis_core.template_base.base_models.TemplateMetadata | None
Optional
Default: null
root_dir
str | None
Optional
Default: null
from_bytes
bool
Optional
Default: false
generic_keyRequired
str
Required
Default: null
audio_file_path
str | None
Optional
Default: null
n_times_execute
int
Optional
Default: 1
sample_rate_khz
int
Optional
Default: 16
audio_reader_format
typing.Optional[typing.Literal['wav', 'raw', 'pcm']]
Optional
Default: null

Configuration example

Generated from documented defaults. Replace any placeholders and complete required nested settings before running.

yaml
templates:
  - template_name: "ExecuteNTimesLazyAudioReaderPydub"
    class_name: "ExecuteNTimesLazyAudioReaderPydub"
    attributes:
      source: "f8beca0a-1ed4-4fd3-a751-cbbda0405dca"
      root_dir: null
      from_bytes: false
      generic_key: "<required>"
      audio_file_path: null
      n_times_execute: 1
      sample_rate_khz: 16
      audio_reader_format: null

Inheritance

Immediate parent: sinapsis_data_readers.templates.audio_readers.audio_reader_pydub.ExecuteNTimesLazyAudioReaderPydub

Environment variables

Environment definitions belong to their canonical Python modules.

No directly related environment variables listed.