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
AudioGenerationDetails
AudioGenerationDetails
class max.pipelines.request.AudioGenerationDetails(*, duration_seconds, sample_rate, channels, num_samples, steps)
Bases: BaseModel
Audio generation usage metadata.
The audio counterpart of ImageGenerationDetails: what a caller
would need to attribute usage, taken from the audio that was actually
produced rather than from what the request asked for, since a model may
stop before the duration it was given.
channels
channels: int
duration_seconds
duration_seconds: float
from_waveform()
classmethod from_waveform(waveform, *, sample_rate, steps)
Build audio generation details from a generated waveform.
-
Parameters:
-
Returns:
-
An
AudioGenerationDetailsdescribing the generated audio. -
Raises:
-
ValueError – If the waveform is not two-dimensional, or the sample rate is not positive.
-
Return type:
model_config
model_config: ClassVar[ConfigDict] = {'frozen': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
num_samples
num_samples: int
sample_rate
sample_rate: int
steps
steps: int