ChatTTSSpeakResult chat.tts-speak-result@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-result.v1.json

chat.tts-speak-result@1: the answer of POST /api/agent-voice/speak (Agent Streams S4). AUDIO is the sound of the line (base64), MIME_TYPE what it is, and RATE the sample rate the desk decodes it to (the stream track is 48 kHz).

Fields

FieldTypeRequiredDescriptionConstraints
audiostringyesThe audio, base64.
mime_typeenumyes
  • one of "audio/mpeg", "audio/wav", "audio/ogg", "audio/webm"
rateinteger
  • minimum 1
voice_idstring | null
  • maxLength 64

Examples

From the contract's own test fixtures: valid ones validate, rejected ones must fail.

Valid: audio
{
  "audio": "SUQzAw==",
  "mime_type": "audio/mpeg",
  "rate": 48000,
  "voice_id": "gary"
}
Rejected: bad-mime
{
  "audio": "SUQzAw==",
  "mime_type": "audio/flac"
}
Rejected: no-audio
{
  "mime_type": "audio/mpeg"
}

Validate

const contracts = require('openvibe-contracts');
contracts.validate('chat.tts-speak-result@1', value);   // { valid, errors: [{ path, message }] }