Skip to main content

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

AttributeTypeRequiredDefaultDescription
idstringUnique identifier for the translation session
organization_idstringYesID of the organization requesting translation
partner_initiator_idstringYesInitiator identifier from external systems
statusenumNoACTIVECurrent session status. One of ACTIVE, COMPLETED, FAILED, or ABANDONED.
directionenumNoBIDIRECTIONALTranslation direction mode. One of BIDIRECTIONAL or UNIDIRECTIONAL.
project_idstringNoAssociated project ID
partner_session_idstringNoExternal session ID for tracking
sdrtn_idstringNoWebRTC session identifier
translationConfigIdstring | nullNoTranslation configuration chain ID
participantsarray<string>NoArray of participant IDs
durationInSecondsnumberNo60Session duration in seconds
transcribedConversationLogarrayNoArray of translation messages
logTranscriptionInParticipantRecordsbooleanNofalseStore messages per-participant
translationSummarystringNoAI-generated session summary
created_daystringNoCreation day in YYYY-MM-DD format
createdAtnumberUnix timestamp when created
updatedAtnumberUnix timestamp when last updated

TranslationParticipant

Represents an individual participant in a translation session including their language preferences, authentication credentials, and role.

Schema: TranslationParticipantSchema

Attributes

AttributeTypeRequiredDefaultDescription
idstringUnique identifier for the participant
nativeLanguagestringYesISO 639-1 language code (2-5 chars)
participantAccessIdnumberYesNumeric ID for WebRTC authentication
participantTokenstringYesShort-lived authentication token
translationServiceLogIdstringNoID of the parent translation session
partnerParticipantRecordIdstringNoExternal participant record ID
namestringNoHuman-readable participant name
isAnchorbooleanNofalseWhether this is the session initiator
transcriptionsarrayNoParticipant's translation messages
participantTranscribedLogsarrayNoFull conversation messages for audit
createdAtnumberUnix timestamp when created
updatedAtnumberUnix timestamp when last updated

TranslationMessage

Individual translation message capturing the complete translation pipeline from speaker's original speech to translated output.

Schema: TranslationMessageSchema

Attributes

AttributeTypeRequiredDescription
messageIdstringYesUnique identifier for this message
speakerParticipantIdstringYesID of the participant who spoke
targetParticipantIdstringYesID of the participant receiving translation
originalLanguageLanguageCodeYesISO 639-1 code of original language
targetLanguageLanguageCodeYesISO 639-1 code of target language
provisioningConfigIdstringYesID of the translation processing chain
timestampnumberYesUnix timestamp when processed
originalTextstringNoTranscribed text in original language
translatedTextstringNoTranslated text in target language
metadataobjectNoAdditional metadata (audio URLs, confidence)

TranslationServiceRequest

Request payload for initiating a real-time translation session.

Schema: TranslationServiceRequestSchema

Attributes

AttributeTypeRequiredDescription
idstringUnique identifier
initiator_idstringYesInitiator participant identifier
initiator_language_codeLanguageCodeYesInitiator's native language
participant_language_codeLanguageCodeYesOther participant's native language
session_idstring | nullNoOptional session ID for grouping
translation_config_idstring | nullNoTranslation configuration to use
createdAtnumberUnix timestamp when created
updatedAtnumberUnix timestamp when last updated

TranslationConversationConfig

Configuration returned when a translation session is successfully initiated.

Schema: TranslationConversationConfigSchema

Attributes

AttributeTypeRequiredDescription
channel_identifierstringYesCommunication channel identifier
initiator_access_idstringYesInitiator's WebRTC access ID
initiator_tokenstringYesInitiator's authentication token
participant_access_idstringYesParticipant's WebRTC access ID
participant_tokenstringYesParticipant's authentication token
sdrtn_idstring | nullNoWebRTC 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

  1. Client submits TranslationServiceRequest with participant details
  2. System creates TranslationServiceLog and TranslationParticipant records
  3. Returns TranslationConversationConfig with WebRTC credentials
  4. Real-time translation begins with bidirectional audio streaming
  5. Each utterance creates a TranslationMessage:
    • Speaker audio → STT (originalText)
    • Translation model (translatedText)
    • TTS → Target participant

Create / Update Schemas

SchemaDescriptionOmits
CreateTranslationServiceRequestSchemaFor initiating translation requestsid, createdAt, updatedAt
CreateTranslationParticipantSchemaFor creating participantsid, createdAt, updatedAt
UpdateTranslationParticipantSchemaFor partial participant updatesAll optional except id
CreateTranslationServiceLogSchemaFor creating translation logsid, createdAt, updatedAt
UpdateTranslationServiceLogSchemaFor partial log updatesAll optional except id