\duncan3dc\Speaker\ProvidersAbstractProvider

Convert a string of a text to spoken word audio.

Summary

Methods
Properties
Constants
setClient()
getClient()
getFormat()
getOptions()
No public properties found
No constants found
sendRequest()
No protected properties found
N/A
No private methods found
$client
N/A

Properties

$client

$client : \GuzzleHttp\ClientInterface

Type

\GuzzleHttp\ClientInterface — A guzzle instance for http requests.

Methods

setClient()

setClient(\GuzzleHttp\ClientInterface  $client) : \duncan3dc\Speaker\Providers\ProviderInterface

Get the guzzle client instance to use.

Parameters

\GuzzleHttp\ClientInterface $client

Returns

\duncan3dc\Speaker\Providers\ProviderInterface

getClient()

getClient() : \GuzzleHttp\ClientInterface

Get the guzzle client.

Returns

\GuzzleHttp\ClientInterface

getFormat()

getFormat() : string

Get the format of this audio.

Returns

string

getOptions()

getOptions() : array

Get the current options.

This is used in caching to determine if we have sent a request with these options before and can use the previous result.

Returns

array

sendRequest()

sendRequest(string  $hostname, array<mixed,string>  $params) : string

Send a http request.

Parameters

string $hostname

The hostname to send the request to

array<mixed,string> $params

The parameters of the request

Returns

string —

The response body