This is historical information of device classes implemented in TextToSpeech device server.

Use this link to find the valid information.

Development status: New development
Information status: Updated

Contact:



Class Description


Families: SoftwareSystem, InputOutput, Miscellaneous, SoftwareSystem

Key words:

Platform: Unix Like

Language: Cpp

License: LGPL

Contact:

Hardware


Bus: Not Applicable

Class interface


Attributes:

Name Description
text_to_talkScalar: DevString The text to speak.
voiceScalar: pogoDsl:EnumType Available voices returned from the text to speech library.
jingleScalar: pogoDsl:EnumType Currently available jingles in the jingle directory (raw pcm files only).
speech_delayScalar: DevShort Time in milliseconds between a jingle finishing playback and speech starting.
cache_hitsScalar: DevULong Total number of cache hits
polly_requestsScalar: DevULong Total number of polly speech requests
total_requestsScalar: DevULong Total speech requests
failed_requestsScalar: DevULong Requests which have either failed or been terminated
successful_requestsScalar: DevULong Total requests that were successful.

Commands:

Name Description
StatusInput: DevVoid
Output: ConstDevString
Device status
This command gets the device status (stored in its device_status data member) and returns it to the caller.
StateInput: DevVoid
Output: State
Device state
This command gets the device state (stored in its device_state data member) and returns it to the caller.
OffInput: DevVoid
Output: DevVoid
Switch TextToSeech to state OFF.
OnInput: DevVoid
Output: DevVoid
Switch TextToSeech to state ON.
ResetInput: DevVoid
Output: DevVoid
Reset TextToSpeech to attempt to recover from an error.
DevClearInput: DevVoid
Output: DevVoid
Clear the text to speech queue.
DevStopInput: DevVoid
Output: DevVoid
Stop talking the current speech request.
DevTalkInput: DevString
Text to be spoken
Output: DevVoid
Request the server speak the text (supplied as an argument)
ClearStatsInput: DevVoid
Output: DevVoid
Clear any gathered stats and debug

Pipes:

Properties:

Name Description
StartTextDevString This text will be spoken at the initialization of the server.
FileCacheLocationDevString Optional parameter to be used when the CacheType is set to File. This specifies the path to use as a cache location. Default is the device server directory
CacheTypeDevString Type of cache to use when caching speech. Supported parameters are ``None`` and ``File``
JingleDirectoryDevString Location of files to be used as jingles
FallbackTextDevString Text used to inform the operator there is a connectivity issue when trying to reach Amazon Polly Services.

README

b"# TextToSpeech\r\n\r\nTextToSpeech (TTS) is a text to speech service TANGO device server. It is based on Amazon Web Services (AWS), and writes its audio via Pulse Audio. The device server currently includes some simple file caching services, to reduce the interaction with AWS.\r\n\r\nThe main text to speech and audio playback code has been separated out into a static library that is linked to both the device server and the unit tests. This separation allows the TTS functionality to be tested per class, and TTS code developed in isolation to the device server. It also reduces the dependencies of the unit tests.\r\n\r\n- TextToSpeech\r\n - Version\r\n - Building\r\n - Dependencies\r\n - Libraries\r\n - Toolchain Dependencies\r\n - Build Flags\r\n - Build\r\n - Example Build Sequence\r\n - Assets\r\n - Installation\r\n - Deployment\r\n - Running Tests\r\n - License\r\n\r\n## Version\r\n\r\nThe current release version is 1.2.0\r\n\r\n## Building\r\n\r\nEnsure the dependencies are installed before build.\r\n\r\n### Dependencies\r\n\r\nTextToSpeech has a number of dependencies both in its toolchain and shared library linkage. Dependencies have been broken down and are as follows:\r\n\r\n#### Libraries\r\n\r\n Amazon AWS SDK for C++. This is available from github.\r\n * The AWS SDK has several dependencies of its own, including libcurl, libopenssl and zlib. To compile the AWS SDK the development version of these dependencies must be installed. A compiled version is provided under /libs. This has been compiled and linked on Debian 9, if using these copy to an appropriate location within the library search path.\r\n PulseAudio development library libpulse-dev and headers.\r\n * Suggest using a debian package, since this will resolve the dependencies correctly.\r\n Tango Controls 9 or higher.\r\n omniORB release 4 - libomniorb4 and libomnithread.\r\n libzmq - libzmq3-dev or libzmq5-dev.\r\n\r\n#### Toolchain Dependencies\r\n\r\n C++14 compliant compiler and std++ library. The device server uses some modern C++ features, including the filesystem API (from C++14), threading, lamda's, futures (from C++11) etc.\r\n CMake 3.1 or greater is required to perform the build.\r\n Debian 9 (Stretch) as a compilation environment.\r\n\r\n### Build Flags\r\n\r\nCustom build flags for the TextToSpeech device server:\r\n\r\n| Flag | Default | Use |\r\n|------|---------|-----|\r\n|TEXT_TO_SPEECH_BUILD_TESTS|ON|Build unit tests|\r\n|TEXT_TO_SPEECH_BUILD_DEBUG_SYMBOLS|OFF|Build the device server with debug systems|\r\n|TEXT_TO_SPEECH_LOG_TO_TANGO|ON|Send tts_library logging to the tango logging system|\r\n|TTS_ENABLE_DEBUG|ON|Build the subsystem tts_library with debug, this is piped to tango output|\r\n|TTS_ENABLE_TRACING|OFF|Build the subsystem tts_library with full code tracing, when ON implies TTS_ENABLE_TRACING=ON|\r\n|TTS_UNIT_TEST_ENABLE_DEBUG|OFF|Build the unit tests with debug messages|\r\n|TTS_UNIT_TEST_ENABLE_TRACING|OFF|Build the unit tests with full code tracing, when ON implies TTS_UNIT_TEST_ENABLE_DEBUG=ON|\r\n\r\nThe following is a list of common useful CMake flags and their use:\r\n\r\n| Flag | Use |\r\n|------|-----|\r\n|CMAKE_PREFIX_PATH|Used to pass a prefix path for pkgconfig to search for the tango.pc file|\r\n\r\n### Build\r\n\r\n#### Example Build Sequence\r\n\r\nThe build must be out of source, so first create a build directory:\r\n\r\n\r\nmkdir build\r\ncd build\r\n\r\n\r\nThis device server uses the tango.pc package config file to configure the build system. When tango is installed on linux (by package or source install), the tango.pc file is also installed. This will be picked up by default when cmake attempts to configure the build system. \r\n\r\nIts possible to redirect CMakes search to find a particular tango.pc file. This can be done simply by setting an environment variable:\r\n\r\n\r\nexport PKG_CONFIG_PATH=/segfs/tango/release/debian9/lib/pkgconfig\r\ncmake ..\r\n\r\n\r\nOr as a temporary environment variable:\r\n\r\n\r\nPKG_CONFIG_PATH=/segfs/tango/release/debian9/lib/pkgconfig cmake ..\r\n\r\n\r\nOr by passing the search location prefix in via CMAKE_PREFIX_PATH\r\n\r\n\r\ncmake -DCMAKE_PREFIX_PATH=/segfs/tango/release/debian9 ..\r\n\r\n\r\nNow build with make:\r\n\r\n\r\nmake\r\n\r\n\r\n#### Assets\r\n\r\nA second target exists to copy and convert the audio assets into raw pcm files (this is the format supported by the TextToSpeech device server currently). This must be run before testing the device server from the build directory, since it will provide a number of jingles for the device server. Once converted, these audio assets should be deployed with the device server. To run the copy and conversion:\r\n\r\n\r\nmake convert-audio\r\n\r\n\r\n## Installation\r\n\r\nAlong with the binary, the TextToSpeech device server requires a small script to configure the AWS keys and some pre-converted audio files. This script is located at scripts/setup.sh and must be run befre the device server is started. \r\n\r\nThe audio files are converted via the build system and placed under the build directory. See Assets. These must be in place for the device server to load jingles from.\r\n\r\n### Deployment\r\n\r\nA suggested deployment strategy is as follows:\r\n\r\n1. Make a directory called TextToSpeechDir in the servers bin directory.\r\n2. Copy the TextToSpeech binary into TextToSpeechDir.\r\n3. Copy script scripts/setup.sh into TextToSpeechDir.\r\n4. Copy the build/jingles (see Assets) to TextToSpeechDir.\r\n5. Copy the script scripts/TextToSpeech to TextToSpeechDirs parent directory (servers bin directory).\r\n6. Setup with Astor as normal, except use the script as the executable. \r\n\r\n## Running Tests\r\n\r\nThe tts_library is covered by a number of unit tests to verify its functionality. There are based on the Catch2 Unit Test framework and are built by default (since TEXT_TO_SPEECH_BUILD_TESTS is set to ON). The tests require both a working internet connection (for AWS Polly) and sound hardware (for PulseAudio). To run the tests from the build directory:\r\n\r\n\r\nbash\r\n./tests/unit-tests\r\n\r\n\r\nTo look at the available tests and tags, should you wish to run a subset of the test suite (for example, you do not have sound hardware), then tests and be listed:\r\n\r\nbash\r\n./bin/unit-tests --list-tests\r\n\r\n\r\nOr:\r\n\r\nbash\r\n./bin/unit-tests --list-tags\r\n\r\n\r\nTo see more options for the unit-test command line binary:\r\n\r\nbash\r\n./bin/unit-tests --help\r\n\r\n\r\nNote: Some unit tests require valid audio, so the convert-audio target must be built before running the tests.\r\nNote: Polly unit tests require the setup.sh script be sourced first.\r\n\r\n## License\r\n\r\nThe code is released under the GPL3 license and a copy of this license is provided with the code. "

30 Mar 2018, Stuart James
Updated:
The device class has been updated.
You are looking at this version now.



30 Mar 2018, Piotr Goryl
Updated:
The device class has been updated.
You can see previous version here .



30 Mar 2018, Andy Gotz
Updated:
The device class has been updated.
You can see previous version here .



28 Mar 2018, Stuart James
Updated:
The device class has been updated.
You can see previous version here .



28 Mar 2018, Stuart James
Created:
The device class has been added to catalogue.
Added by:sjames on:30 Mar 2018, 5:39 p.m.