WordPress\AiClient\Providers\Models\SpeechGeneration\Contracts

SpeechGenerationModelInterface{}interfaceWP 0.1.0

Interface for models that support speech generation.

Provides synchronous methods for generating speech from prompts.

No Hooks.

Usage

$SpeechGenerationModelInterface = new SpeechGenerationModelInterface();
// use class methods

Methods

  1. public generateSpeechResult(array $prompt)

Changelog

Since 0.1.0 Introduced.

SpeechGenerationModelInterface{} code WP 7.0

interface SpeechGenerationModelInterface
{
    /**
     * Generates speech from a prompt.
     *
     * @since 0.1.0
     *
     * @param list<Message> $prompt Array of messages containing the speech generation prompt.
     * @return GenerativeAiResult Result containing generated speech audio.
     */
    public function generateSpeechResult(array $prompt): GenerativeAiResult;
}