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
OutputAudioContent
OutputAudioContent
class max.pipelines.request.OutputAudioContent(*, type='output_audio', audio_url=None, audio_data=None, format=None, sample_rate=None, num_samples=None, samples=None)
Bases: BaseModel
Audio content generated by the model in output messages.
-
Parameters:
audio_data
audio_url
format
from_numpy_samples()
classmethod from_numpy_samples(samples, *, sample_rate, format=None)
Creates internal audio content from a raw waveform.
-
Parameters:
-
Returns:
-
An
OutputAudioContentcarrying the raw waveform, for the route to encode into a container. -
Raises:
-
ValueError – If the dtype, rank, or sample rate is invalid.
-
Return type:
model_config
model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'frozen': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
num_samples
sample_rate
samples
samples: SkipJsonSchema[npt.NDArray[np.float32] | None]
type
type: Literal['output_audio']