ChatTTSSpeakRequest chat.tts-speak-request@1
Generated at from
openvibe-contracts v0.419.0 and
openvibe-sdk v0.161.0.
- Version
- 1.0.0
- Owner
- chat
- Visibility
- first-party
- Status
- active
- Compatibility
- backward
- Schema
https://openvibe.network/contracts/chat/tts-speak-request.v1.json
chat.tts-speak-request@1: the body of POST /api/agent-voice/speak (Agent Streams S4). The desk asks Chat for the sound of one line the agent said. TEXT is the line (at most 220 characters). VOICE is a Chat voice id, or absent for the site default. OWN asks for the person own voice, and only the person themself may ask for it.
Fields
| Field | Type | Required | Description | Constraints |
|---|---|---|---|---|
text | string | yes |
| |
voice | string |
| ||
own | boolean |
Examples
From the contract's own test fixtures: valid ones validate, rejected ones must fail.
Valid: a-line
{
"text": "The checkout tests are green."
}Valid: with-voice
{
"text": "The checkout tests are green.",
"voice": "gary",
"own": false
}Rejected: no-text
{
"voice": "gary"
}Rejected: too-long
{
"text": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
}Validate
const contracts = require('openvibe-contracts');
contracts.validate('chat.tts-speak-request@1', value); // { valid, errors: [{ path, message }] }