WordPress\AiClient\Providers\Models\SpeechGeneration\Contracts

SpeechGenerationModelInterface{} │ interface │ WP 0.1.0

Interface for models that support speech generation.

Provides synchronous methods for generating speech from prompts.

Хуков нет.

Использование

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

Методы

  1. public generateSpeechResult(array $prompt)

Список изменений

С версии 0.1.0 Введена.

Код SpeechGenerationModelInterface{} WP 7.1.3

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;
}