To use the service you will need the **access key**, **secret key** and **server region**.
-## Service Configuration
+## Configuration
The following configurations can be edited using the "Polly Text-to-Speech" settings in the UI:
* **Secret Key** - The AWS credentials secret key (required).
* **Service Region** - The service region used for accessing Polly (required). To reduce latency select the region closest to you. E.g. "eu-west-1" (see [regions](https://docs.aws.amazon.com/general/latest/gr/rande.html#pol_region))
-The PollyTTS service caches audio files from previous requests.
-This reduces traffic, improves performance, reduces the number of requests and provides offline functionality.
-
* **Cache Expiration** - Cache expiration in days.
+The PollyTTS service caches audio files from previous requests.
+This reduces traffic, improves performance, reduces the number of requests and provides offline functionality.
When cache files are used their time stamps are updated, unused files are purged if their time stamp exceeds the specified age.
The default value of 0 disables this functionality.
A value of 365 removes files that have been unused for a year.
The default audio format can be overriden with the value "mp3" or "ogg".
-### Service Configuration via Text files
-
-Create a new file in `$OPENHAB_ROOT/conf/services` named `pollytts.cfg`
+In case you would like to setup the service via a text file, create a new file in `$OPENHAB_ROOT/conf/services` named `pollytts.cfg`
It's contents should look similar to:
```
-org.openhab.voice.pollytts:accessKey=ACCESS_KEY_ID
+org.openhab.voice.pollytts:accessKey=ACCESS_KEY
org.openhab.voice.pollytts:secretKey=SECRET_KEY
-org.openhab.voice.pollytts:serviceRegion=SERVICE_REGION
-org.openhab.voice.pollytts:cacheExpiration=EXPIRATION_IN_DAYS
+org.openhab.voice.pollytts:serviceRegion=eu-west-1
+org.openhab.voice.pollytts:cacheExpiration=0
+org.openhab.voice.pollytts:audioFormat=default
```
-These have the same meanings as described in the **Service Configuration** block above.
-
## Rule Examples
```