PromptBuilder::generateSpeechResult(): WordPressAiClientResultsDTOGenerativeAiResult

In this article

Generates a speech result from the prompt.

Return

WordPressAiClientResultsDTOGenerativeAiResult The generated result containing speech audio candidates.

Source

public function generateSpeechResult(): GenerativeAiResult
{
    // Include audio in output modalities
    $this->includeOutputModalities(ModalityEnum::audio());
    // Generate and return the result with speech generation capability
    return $this->generateResult(CapabilityEnum::speechGeneration());
}

Changelog

VersionDescription
0.1.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.