PHP Class duncan3dc\Sonos\Tracks\TextToSpeech

Inheritance: implements duncan3dc\Sonos\Tracks\UriInterface
Datei anzeigen Open project: duncan3dc/sonos Class Usage Examples

Protected Properties

Property Type Description
$directory duncan3dc\Sonos\Directory The directory to store the audio file in.
$provider Provider The text to speech provider.
$text string The text to convert.

Public Methods

Method Description
__construct ( string $text, duncan3dc\Sonos\Directory $directory, duncan3dc\Speaker\Providers\ProviderInterface $provider = null ) Create a TextToSpeech object.
getMetaData ( ) : string Get the metadata xml for this message.
getProvider ( )
getUri ( ) : string Get the URI for this message.
setLanguage ( string $language ) : static Set the language to use in the google text-to-speech call.
setProvider ( duncan3dc\Speaker\Providers\ProviderInterface $provider )

Method Details

__construct() public method

Create a TextToSpeech object.
public __construct ( string $text, duncan3dc\Sonos\Directory $directory, duncan3dc\Speaker\Providers\ProviderInterface $provider = null )
$text string The text to convert
$directory duncan3dc\Sonos\Directory The directory to store the audio file in
$provider duncan3dc\Speaker\Providers\ProviderInterface

getMetaData() public method

Get the metadata xml for this message.
public getMetaData ( ) : string
return string

getProvider() public method

public getProvider ( )

getUri() public method

If it doesn't already exist on the filesystem then the text-to-speech handler will be called.
public getUri ( ) : string
return string

setLanguage() public method

Set the language to use in the google text-to-speech call.
public setLanguage ( string $language ) : static
$language string The language to use (eg 'en')
return static

setProvider() public method

public setProvider ( duncan3dc\Speaker\Providers\ProviderInterface $provider )
$provider duncan3dc\Speaker\Providers\ProviderInterface

Property Details

$directory protected_oe property

The directory to store the audio file in.
protected Directory,duncan3dc\Sonos $directory
return duncan3dc\Sonos\Directory

$provider protected_oe property

The text to speech provider.
protected Provider $provider
return Provider

$text protected_oe property

The text to convert.
protected string $text
return string