Translation
Translation schemas manage real-time language translation sessions between participants speaking different languages. Enables cross-language communication through speech-to-text transcription, translation, and text-to-speech synthesis.
Source: src/core/conversation/translation-config.schema.ts, src/core/conversation/translation-conversation.schema.ts
TranslationServiceLogโ
Complete record of a translation session including participant information, session metadata, message history, and operational status.
Schema: TranslationServiceLogSchema
Attributesโ
| Attribute | Type | Required | Default | Description |
|---|---|---|---|---|
id | string | โ | โ | Unique identifier for the translation session |
organization_id | string | Yes | โ | ID of the organization requesting translation |
partner_initiator_id | string | Yes | โ | Initiator identifier from external systems |
status | enum | No | ACTIVE | Current session status. One of ACTIVE, COMPLETED, FAILED, or ABANDONED. |
direction | enum | No | BIDIRECTIONAL | Translation direction mode. One of BIDIRECTIONAL or UNIDIRECTIONAL. |
project_id | string | No | โ | Associated project ID |
partner_session_id | string | No | โ | External session ID for tracking |
sdrtn_id | string | No | โ | WebRTC session identifier |
translationConfigId | string | null | No | โ | Translation configuration chain ID |
participants | array<string> | No | โ | Array of participant IDs |
durationInSeconds | number | No | 60 | Session duration in seconds |
transcribedConversationLog | array | No | โ | Array of translation messages |
logTranscriptionInParticipantRecords | boolean | No | false | Store messages per-participant |
translationSummary | string | No | โ | AI-generated session summary |
created_day | string | No | โ | Creation day in YYYY-MM-DD format |
createdAt | number | โ | โ | Unix timestamp when created |
updatedAt | number | โ | โ | Unix timestamp when last updated |
TranslationParticipantโ
Represents an individual participant in a translation session including their language preferences, authentication credentials, and role.
Schema: TranslationParticipantSchema
Attributesโ
| Attribute | Type | Required | Default | Description |
|---|---|---|---|---|
id | string | โ | โ | Unique identifier for the participant |
nativeLanguage | string | Yes | โ | ISO 639-1 language code (2-5 chars) |
participantAccessId | number | Yes | โ | Numeric ID for WebRTC authentication |
participantToken | string | Yes | โ | Short-lived authentication token |
translationServiceLogId | string | No | โ | ID of the parent translation session |
partnerParticipantRecordId | string | No | โ | External participant record ID |
name | string | No | โ | Human-readable participant name |
isAnchor | boolean | No | false | Whether this is the session initiator |
transcriptions | array | No | โ | Participant's translation messages |
participantTranscribedLogs | array | No | โ | Full conversation messages for audit |
createdAt | number | โ | โ | Unix timestamp when created |
updatedAt | number | โ | โ | Unix timestamp when last updated |
TranslationMessageโ
Individual translation message capturing the complete translation pipeline from speaker's original speech to translated output.
Schema: TranslationMessageSchema
Attributesโ
| Attribute | Type | Required | Description |
|---|---|---|---|
messageId | string | Yes | Unique identifier for this message |
speakerParticipantId | string | Yes | ID of the participant who spoke |
targetParticipantId | string | Yes | ID of the participant receiving translation |
originalLanguage | LanguageCode | Yes | ISO 639-1 code of original language |
targetLanguage | LanguageCode | Yes | ISO 639-1 code of target language |
provisioningConfigId | string | Yes | ID of the translation processing chain |
timestamp | number | Yes | Unix timestamp when processed |
originalText | string | No | Transcribed text in original language |
translatedText | string | No | Translated text in target language |
metadata | object | No | Additional metadata (audio URLs, confidence) |
TranslationServiceRequestโ
Request payload for initiating a real-time translation session.
Schema: TranslationServiceRequestSchema
Attributesโ
| Attribute | Type | Required | Description |
|---|---|---|---|
id | string | โ | Unique identifier |
initiator_id | string | Yes | Initiator participant identifier |
initiator_language_code | LanguageCode | Yes | Initiator's native language |
participant_language_code | LanguageCode | Yes | Other participant's native language |
session_id | string | null | No | Optional session ID for grouping |
translation_config_id | string | null | No | Translation configuration to use |
createdAt | number | โ | Unix timestamp when created |
updatedAt | number | โ | Unix timestamp when last updated |
TranslationConversationConfigโ
Configuration returned when a translation session is successfully initiated.
Schema: TranslationConversationConfigSchema
Attributesโ
| Attribute | Type | Required | Description |
|---|---|---|---|
channel_identifier | string | Yes | Communication channel identifier |
initiator_access_id | string | Yes | Initiator's WebRTC access ID |
initiator_token | string | Yes | Initiator's authentication token |
participant_access_id | string | Yes | Participant's WebRTC access ID |
participant_token | string | Yes | Participant's authentication token |
sdrtn_id | string | null | No | WebRTC session identifier |
Exampleโ
Translation Service Logโ
{
"id": "trans_abc123",
"organization_id": "org_xyz",
"project_id": "proj_456",
"partner_initiator_id": "customer_789",
"status": "COMPLETED",
"direction": "BIDIRECTIONAL",
"participants": ["part_001", "part_002"],
"durationInSeconds": 300,
"transcribedConversationLog": [
{
"messageId": "msg_001",
"speakerParticipantId": "part_001",
"targetParticipantId": "part_002",
"originalText": "Hello, how can I help you today?",
"translatedText": "Hola, ยฟcรณmo puedo ayudarte hoy?",
"originalLanguage": "en-US",
"targetLanguage": "es-MX",
"provisioningConfigId": "prov_trans_001",
"timestamp": 1709856000000
}
],
"createdAt": 1709856000000,
"updatedAt": 1709856300000
}
Translation Participantโ
{
"id": "part_001",
"translationServiceLogId": "trans_abc123",
"name": "Support Agent",
"isAnchor": false,
"nativeLanguage": "en-US",
"participantAccessId": 12345,
"participantToken": "eyJhbG...",
"createdAt": 1709856000000,
"updatedAt": 1709856000000
}
Translation Service Requestโ
{
"initiator_id": "customer_789",
"initiator_language_code": "es-MX",
"participant_language_code": "en-US",
"session_id": "session_abc",
"translation_config_id": "config_trans_001"
}
Translation Flowโ
- Client submits
TranslationServiceRequestwith participant details - System creates
TranslationServiceLogandTranslationParticipantrecords - Returns
TranslationConversationConfigwith WebRTC credentials - Real-time translation begins with bidirectional audio streaming
- Each utterance creates a
TranslationMessage:- Speaker audio โ STT (originalText)
- Translation model (translatedText)
- TTS โ Target participant
Create / Update Schemasโ
| Schema | Description | Omits |
|---|---|---|
CreateTranslationServiceRequestSchema | For initiating translation requests | id, createdAt, updatedAt |
CreateTranslationParticipantSchema | For creating participants | id, createdAt, updatedAt |
UpdateTranslationParticipantSchema | For partial participant updates | All optional except id |
CreateTranslationServiceLogSchema | For creating translation logs | id, createdAt, updatedAt |
UpdateTranslationServiceLogSchema | For partial log updates | All optional except id |
Relatedโ
- Conversation Configuration - Standard conversation management
- Provisioning Config - Voice processing chains for translation
- Voice & Language - Language and voice configuration