WordPress\AiClient\Providers\Models\SpeechGeneration\Contracts
SpeechGenerationModelInterface{}
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
Changelog
| Since 0.1.0 | Introduced. |
SpeechGenerationModelInterface{} 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;
}