Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
144 changes: 144 additions & 0 deletions modules/bom/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
<pdfbox.version>2.0.24</pdfbox.version>
<poi.version>5.0.0</poi.version>
<libreoffice.version>24.2.3</libreoffice.version>
<awssdk.version>2.31.45</awssdk.version>
</properties>

<dependencyManagement>
Expand Down Expand Up @@ -452,6 +453,11 @@
<artifactId>tts-adapter-acapela</artifactId>
<version>3.1.7</version>
</dependency>
<dependency>
<groupId>org.daisy.pipeline.modules</groupId>
<artifactId>tts-adapter-aws</artifactId>
<version>1.0.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.daisy.pipeline.modules</groupId>
<artifactId>tts-adapter-azure</artifactId>
Expand Down Expand Up @@ -712,6 +718,144 @@
<artifactId>client-sdk</artifactId>
<version>1.37.0</version>
</dependency>
<!--
for tts-adapter-aws
-->
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>polly</artifactId>
<version>${awssdk.version}</version>
</dependency>
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>sdk-core</artifactId>
<version>${awssdk.version}</version>
</dependency>
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>auth</artifactId>
<version>${awssdk.version}</version>
</dependency>
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>identity-spi</artifactId>
<version>${awssdk.version}</version>
</dependency>
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>http-auth</artifactId>
<version>${awssdk.version}</version>
</dependency>
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>http-auth-aws</artifactId>
<version>${awssdk.version}</version>
</dependency>
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>http-auth-spi</artifactId>
<version>${awssdk.version}</version>
</dependency>
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>http-client-spi</artifactId>
<version>${awssdk.version}</version>
</dependency>
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>apache-client</artifactId>
<version>${awssdk.version}</version>
</dependency>
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>aws-core</artifactId>
<version>${awssdk.version}</version>
</dependency>
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>utils</artifactId>
<version>${awssdk.version}</version>
</dependency>
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>regions</artifactId>
<version>${awssdk.version}</version>
</dependency>
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>aws-json-protocol</artifactId>
<version>${awssdk.version}</version>
</dependency>
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>retries</artifactId>
<version>${awssdk.version}</version>
</dependency>
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>retries-spi</artifactId>
<version>${awssdk.version}</version>
</dependency>
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>profiles</artifactId>
<version>${awssdk.version}</version>
</dependency>
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>endpoints-spi</artifactId>
<version>${awssdk.version}</version>
</dependency>
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>metrics-spi</artifactId>
<version>${awssdk.version}</version>
</dependency>
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>protocol-core</artifactId>
<version>${awssdk.version}</version>
</dependency>
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>aws-json-protocol</artifactId>
<version>${awssdk.version}</version>
</dependency>
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>json-utils</artifactId>
<version>${awssdk.version}</version>
</dependency>
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>third-party-jackson-core</artifactId>
<version>${awssdk.version}</version>
</dependency>
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>checksums</artifactId>
<version>${awssdk.version}</version>
</dependency>
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>checksums-spi</artifactId>
<version>${awssdk.version}</version>
</dependency>
<dependency>
<groupId>org.reactivestreams</groupId>
<artifactId>reactive-streams</artifactId>
<version>1.0.4</version>
</dependency>
<dependency>
<groupId>org.reactivestreams</groupId>
<artifactId>reactive-streams-tck</artifactId>
<version>1.0.4</version>
</dependency>
<dependency>
<groupId>org.reactivestreams</groupId>
<artifactId>reactive-streams-tck-flow</artifactId>
<version>1.0.4</version>
</dependency>
<!--
for audio-common
-->
Expand Down
1 change: 1 addition & 0 deletions modules/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@
<module>tts/tts-adapters/tts-adapter-google</module>
<module>tts/tts-adapters/tts-adapter-cereproc</module>
<module>tts/tts-adapters/tts-adapter-azure</module>
<module>tts/tts-adapters/tts-adapter-aws</module>
<module>tts/tts-mocks</module>
<module>tts/mathml-to-ssml</module>
<module>braille/braille-common</module>
Expand Down
28 changes: 28 additions & 0 deletions modules/tts/tts-adapters/tts-adapter-aws/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# AWS Polly Text-To-Speech Adapter

This adapter provides a way to use the Amazon Web Service - Polly Text-to-Speech service in the pipeline. It is based on the [AWS SDK for Java](https://aws.amazon.com/sdk-for-java/) and the [AWS Polly API](https://docs.aws.amazon.com/polly/latest/dg/what-is.html).

## New properties

The following properties are used by this adapter:

- `org.daisy.pipeline.tts.aws.accesskey` (mandatory) : Access key to connect to Amazon Web Service.
- `org.daisy.pipeline.tts.aws.secretkey` (mandatory) : Secret key to connect to Amazon Web Service.
- `org.daisy.pipeline.tts.aws.region` (mandatory) : Region associated with your Amazon Web Service account.
- `org.daisy.pipeline.tts.aws.priority` (defaults to `15`) : priority of usage within the pipeline if other text engine are available

## Usage

This adapter requires authentication keys (namely an access key and a secret key) to access the AWS Polly service.

To get those keys, you will need to create an AWS account and a "IAM user" account, or a root user registered in an instance of an IAM identity center. To create such user account, please refer to the [AWS IAM user creation documentation](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_users_create.html).
Note that while it is not recommended, you can also use your root account to generate the required keys, as explained in [this AWS documention page](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_root-user_manage_add-key.html).

From the IAM User account or your root, you should be able to create access and secret keys by following the instructions in the [AWS IAM user documentation](https://docs.aws.amazon.com/IAM/latest/UserGuide/access-key-self-managed.html).

You should be able to retrieve the region identifier from your associated IAM identity center instance.
As an example for europe/paris, it would be displayed as `eu-west-3`.

## Tests

For unit test to work, please add the required properties mentionned above (`org.daisy.pipeline.tts.aws.{accesskey,secretkey,region}`) to either your configuration or pom, or add the options `-Dorg.daisy.pipeline.tts.aws.accesskey="your_access_key" -Dorg.daisy.pipeline.tts.aws.secretkey="your_secret_key" -Dorg.daisy.pipeline.tts.aws.region="your_region"` to your maven call.
73 changes: 73 additions & 0 deletions modules/tts/tts-adapters/tts-adapter-aws/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">

<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>org.daisy.pipeline.modules</groupId>
<artifactId>modules-parent</artifactId>
<version>1.15.0</version>
<relativePath>../../../parent</relativePath>
</parent>

<version>1.0.0-SNAPSHOT</version>
<artifactId>tts-adapter-aws</artifactId>
<packaging>bundle</packaging>

<name>DAISY Pipeline 2 module :: TTS Adapter for Amazon Polly text-to-speech service</name>
<description>Implementation of the TTS API for Amazon Polly text-to-speech service</description>

<dependencies>
<dependency>
<groupId>org.daisy.pipeline.modules</groupId>
<artifactId>tts-common</artifactId>
</dependency>
<dependency>
<groupId>org.daisy.libs</groupId>
<artifactId>saxon-he</artifactId>
</dependency>
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>polly</artifactId>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
</dependency>
</dependencies>

<properties>
<expose-services>
org.daisy.pipeline.tts.aws.impl.AWSPollyTTSService
</expose-services>
</properties>

<build>
<plugins>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<configuration>
<instructions>
<Import-Package>
net.sf.saxon.*;version="${saxon.versionRange}",
!org.daisy.common.spi,
*
</Import-Package>
</instructions>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<systemPropertyVariables>
<org.daisy.pipeline.tts.aws.accesskey>ToBeSetForTests</org.daisy.pipeline.tts.aws.accesskey>
<org.daisy.pipeline.tts.aws.secretkey>ToBeSetForTests</org.daisy.pipeline.tts.aws.secretkey>
<org.daisy.pipeline.tts.aws.region>ToBeSetForTests</org.daisy.pipeline.tts.aws.region>
</systemPropertyVariables>
</configuration>
</plugin>
</plugins>
</build>
</project>
Loading