Skip to main content

Get Transcript History

Retrieve transcription history for an app session.

Endpoint

Headers

The code shows this endpoint is incorrectly defined as /api/transcripts/:appSessionId at line 18, but it should be just /transcripts/:appSessionId since the router is mounted at /api.

Parameters

Query Parameters

You must provide either duration OR startTime/endTime parameters.

Response

Success (200):
Error (400):
Error (404):
Error (500):

Implementation

  • File: packages/cloud/src/routes/transcripts.routes.ts:18-70
  • Service: Uses TranscriptionManager.getTranscriptHistory()
  • Session: Extracts user session ID from app session ID by splitting on ’-‘

Time Range Options

  1. Duration-based (most common):
    Returns last 5 minutes (300 seconds) of transcripts
  2. Time range:
    Returns transcripts within specific time range

Transcript Segment Structure

Each segment is a TranscriptSegment object containing:
  • speakerId: Optional speaker identifier
  • resultId: Unique identifier for this transcript segment
  • text: The transcribed text
  • timestamp: ISO timestamp when the segment was created
  • isFinal: Whether this is a final or interim result

Language Support

The system supports multiple languages for transcription. Common language codes include:
  • en-US - English (US) - default
  • es-ES - Spanish (Spain)
  • fr-FR - French (France)
  • de-DE - German (Germany)
  • it-IT - Italian (Italy)
  • pt-BR - Portuguese (Brazil)
  • ja-JP - Japanese (Japan)
  • ko-KR - Korean (Korea)
  • zh-CN - Chinese (Simplified)

Session ID Format

The appSessionId parameter follows the format: {userSessionId}-{appIdentifier} For example: session123-com.example.app The endpoint extracts the user session ID by splitting on the first hyphen.

Error Codes

Notes

  • Transcripts are stored in memory per user session
  • Historical data availability depends on session duration
  • Language filtering returns only transcripts in the specified language
  • Apps should authenticate using API key headers (though validation is not shown in the current implementation)
  • Console logs are present for debugging (lines 26, 59)