Docs /Templates/ sinapsis-data-readers

AudioReaderToBytes

sinapsis-data-readerscommunityaudioreaderspydubsoundfile

Python template · sinapsis_data_readers.templates.audio_readers.audio_reader_to_bytes

Overview

AudioReader for Reading Audio Files and Converting to Bytes.

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

The source identifier, defaults to "streamlit".

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
audio_file_pathRequired

Path to the audio file to be read.

str
Required
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: AudioReaderToBytes
      class_name: AudioReaderToBytes
      template_input: InputTemplate
      attributes:
        audio_file_path: '/path/to/file.mp3'
        source: 'source/of/file'
        from_bytes: true
Show schema-based configuration skeleton
yaml
templates:
  - template_name: "AudioReaderToBytes"
    class_name: "AudioReaderToBytes"
    attributes:
      source: "f8beca0a-1ed4-4fd3-a751-cbbda0405dca"
      root_dir: null
      audio_file_path: "<required>"

Inheritance

Immediate parent: sinapsis_data_readers.templates.audio_readers.base_audio_reader._AudioBaseReader

Environment variables

Environment definitions belong to their canonical Python modules.

No directly related environment variables listed.