Repository navigation
RDKDEV-1789: Add TTS Engine Documentation - #16
Open
gourivarma3 wants to merge 1 commit into
Open
gourivarma3 wants to merge 1 commit into
gourivarma3 wants to merge 1 commit into
Conversation
|
You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool. What Enabling Code Scanning Means:
For more information about GitHub Code Scanning, check out the documentation. |
There was a problem hiding this comment.
🟡 Changes recommended
Incorrect backend capability and authentication guarantees could mislead application integration.
8 open findings
Document session query and single-binding limitations · New Document backend limitations for speech cancellation callbacks · New Clarify JSON-RPC-only token acquisition behavior · New Document non-interchangeable backend API behavior · New List required and optional build dependencies separately · New Limit server-closed callback guarantee to JSON-RPC · New Correct ITextToSpeech method names and source reference · New Clarify default and runtime Firebolt backend selection · New
What changed in this PR
Adds component documentation for the TTS Engine client library within the RDK middleware stack.
Changes:
- Describes architecture, IPC backends, and lifecycle flows with diagrams.
- Documents APIs, callbacks, dependencies, and configuration.
| File | Description |
|---|---|
| docs/README.md | Adds TTS Engine architecture and integration documentation. |
🧠 Review effort: Balanced
Give feedback about Copilot approvals in this survey to enter a drawing for a $150 gift card.
| **Key Features & Responsibilities:** | ||
|
|
||
| - **Multi-backend IPC abstraction**: Supports three communication backends — JSON-RPC (default), COM-RPC, and Firebolt — selectable at build time or runtime via environment variable, with a common API surface exposed to callers in all cases. | ||
| - **Speech session lifecycle management**: Provides APIs to create and destroy per-application speech sessions, and to track session state (active, idle). |
| - **Speech session lifecycle management**: Provides APIs to create and destroy per-application speech sessions, and to track session state (active, idle). | ||
| - **Full speech control**: Exposes APIs to initiate speech synthesis (`speak`), pause, resume, and abort ongoing or pending speech requests. | ||
| - **TTS configuration management**: Allows reading and writing TTS parameters including endpoint URL, language, voice, volume, and speech rate. | ||
| - **Event-driven callback model**: Delivers asynchronous notifications to callers for all speech lifecycle events (start, pause, resume, cancel, interrupt, complete) and error conditions (network error, playback error), as well as TTS enable/disable state and voice change notifications. |
| - **Full speech control**: Exposes APIs to initiate speech synthesis (`speak`), pause, resume, and abort ongoing or pending speech requests. | ||
| - **TTS configuration management**: Allows reading and writing TTS parameters including endpoint URL, language, voice, volume, and speech rate. | ||
| - **Event-driven callback model**: Delivers asynchronous notifications to callers for all speech lifecycle events (start, pause, resume, cancel, interrupt, complete) and error conditions (network error, playback error), as well as TTS enable/disable state and voice change notifications. | ||
| - **Security token integration**: Acquires and uses WPEFramework security tokens automatically when communicating with the Thunder plugin, with fallback to unsecured operation when the security utility is absent. |
|
|
||
| ## Design | ||
|
|
||
| The TTS Engine client library is structured around a Bridge pattern that cleanly separates the public API from the underlying IPC mechanism. The `TTSClient` class is the sole entry point for callers; it owns a pointer to a `TTSClientPrivateInterface` instance selected at creation time based on the configured or detected backend. This design means the calling application is fully insulated from IPC transport details and requires no change when the backend is switched. |
|
|
||
| #### Platform and Integration Requirements | ||
|
|
||
| - **Build Dependencies**: `wpeframework`, `wpeframework-clientlibraries`, `gstreamer1.0-plugins-base`, `rdk-logger`, `breakpad` (when `ENABLE_BREAKPAD=1`), `FireboltSDK` (when Firebolt backend is selected). |
|
|
||
| - When the `org.rdk.TextToSpeech` plugin fires `onttsstatechanged`, the service layer dispatches `onTTSStateChanged(bool)` to all registered `TTSConnectionCallback` instances. | ||
| - When the voice is changed on the plugin side, `onVoiceChanged(string)` is delivered. | ||
| - If the Thunder plugin deactivates (detected via the WPEFramework plugin state-change handler), registered clients receive `onTTSServerClosed()`. |
Comment on lines
+351
to
+357
| | `Exchange::ITextToSpeech::enableTTS()` | COM-RPC | Enable or disable TTS globally | `TTSClientPrivateCOMRPC.cpp` | | ||
| | `Exchange::ITextToSpeech::setConfiguration()` | COM-RPC | Set TTS configuration | `TTSClientPrivateCOMRPC.cpp` | | ||
| | `Exchange::ITextToSpeech::getConfiguration()` | COM-RPC | Get TTS configuration | `TTSClientPrivateCOMRPC.cpp` | | ||
| | `Exchange::ITextToSpeech::speak()` | COM-RPC | Submit text for synthesis | `TTSClientPrivateCOMRPC.cpp` | | ||
| | `Exchange::ITextToSpeech::cancel()` | COM-RPC | Abort ongoing speech | `TextToSpeechServiceCOMRPC.cpp` | | ||
| | `Exchange::ITextToSpeech::pause()` | COM-RPC | Pause ongoing speech | `TextToSpeechServiceCOMRPC.cpp` | | ||
| | `Exchange::ITextToSpeech::resume()` | COM-RPC | Resume paused speech | `TextToSpeechServiceCOMRPC.cpp` | |
|
|
||
| | Parameter | Type | Default | Description | | ||
| | ------------------------ | ---------- | ------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | ||
| | `TTS_CLIENT_BACKEND` | env string | (build default) | Selects the active IPC backend at runtime. Accepted values: `comrpc`, `firebolt`. When absent or set to an unrecognized value, the JSON-RPC backend is used. | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

RDKDEV-1789
Reason for Change: To add Component Documentation for ttsengine.
Fix: Added the README documentation
Test Procedure: None
I have read the CLA Document and I hereby sign the CLA
Signed-off-by: gourivarma3 gouri_varma@comcast.com