IMPORTANT: To view this page as Markdown, append `.md` to the URL (e.g. /get-started.md). For the complete documentation index, see llms.txt.
Skip to main content
For the complete documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /get-started.md).

Python class

AudioExecutor

AudioExecutor

class max.pipelines.audio.AudioExecutor(manifest, session, runtime_config)

source

Bases: Protocol[_ContextT, _InputsT, _OutputsT]

What AudioGenerationPipeline requires of an architecture.

Structurally this is PipelineExecutorprepare_inputs then execute, with the caller owning device placement in between – narrowed so that execute returns waveforms, plus the rate those samples are meant to be played back at. The rate is a property of the model’s vocoder rather than of the request, which is why it lives here and not on the context.

Declared as a Protocol rather than as a subclass of PipelineExecutor because that class lives in max.pipelines.lib, which imports this package’s pipeline from its registry: inheriting would close the cycle. Architectures subclass PipelineExecutor as usual and satisfy this by shape.

Compiles the model’s components and loads their weights.

Parameters:

execute()

execute(inputs)

source

Runs every stage of the model and returns the finished audio.

Parameters:

inputs (_InputsT)

Return type:

_OutputsT

prepare_inputs()

prepare_inputs(contexts)

source

Converts a batch of contexts into the executor’s inputs.

Parameters:

contexts (list[_ContextT])

Return type:

_InputsT

sample_rate

property sample_rate: int

source

Playback rate of the generated waveform, in hertz.