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)
Bases: Protocol[_ContextT, _InputsT, _OutputsT]
What AudioGenerationPipeline requires of an architecture.
Structurally this is
PipelineExecutor –
prepare_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:
-
- manifest (ModelManifest)
- session (InferenceSession)
- runtime_config (PipelineRuntimeConfig)
execute()
execute(inputs)
Runs every stage of the model and returns the finished audio.
-
Parameters:
-
inputs (_InputsT)
-
Return type:
-
_OutputsT
prepare_inputs()
prepare_inputs(contexts)
Converts a batch of contexts into the executor’s inputs.
-
Parameters:
-
contexts (list[_ContextT])
-
Return type:
-
_InputsT
sample_rate
property sample_rate: int
Playback rate of the generated waveform, in hertz.