Skip to main content
GET
/
api
/
v1
/
ambient
/
session
/
{ambient_session_id}
/
transcript
Gets the completed transcripts for the ambient session.
curl --request GET \
  --url https://sdp.suki-stage.com/api/v1/ambient/session/{ambient_session_id}/transcript \
  --header 'sdp_suki_token: <sdp_suki_token>'
{
  "final_transcript": [
    {
      "end_offset": {
        "hours": 0,
        "minutes": 6,
        "nanos": 80000000,
        "seconds": 42
      },
      "end_time": "2024-12-04T09:40:48.792948332Z",
      "lang_id": "en",
      "recording_id": "c9d59aa8-cd48-4f5a-be81-5d0c9d2a5885",
      "start_offset": {
        "hours": 0,
        "minutes": 6,
        "nanos": 80000000,
        "seconds": 42
      },
      "start_time": "2024-12-04T09:40:42.393948332Z",
      "transcript": "The patient has shown an allergy to pollen",
      "transcript_id": "01JE8GP4RTHH0KDEGRSTRVPMGH"
    }
  ]
}
Use this endpoint to get the full transcript for a specified ambient session after it has completed.
Updated:The response will now include the new lang_id field within the payload. The lang_id field indicates the language in which the transcript was sent.
For a full list of language codes and their corresponding languages, refer to the Language Mapping section.

Code Examples

  • Python
  • TypeScript
import requests

ambient_session_id = "123dfg-456dfg-789dfg-012dfg"
url = f"https://sdp.suki.ai/api/v1/ambient/session/{ambient_session_id}/transcript"

headers = {
    "sdp_suki_token": "<sdp_suki_token>"
}

response = requests.get(url, headers=headers)

if response.status_code == 200:
    transcript_data = response.json()
    print("Transcript:")
    for transcript in transcript_data.get("final_transcript", []):
        print(f"Transcript ID: {transcript.get('transcript_id')}")
        print(f"Recording ID: {transcript.get('recording_id')}")
        print(f"Language: {transcript.get('lang_id')}")
        print(f"Transcript: {transcript.get('transcript')}")
        print(f"Start Time: {transcript.get('start_time')}")
        print(f"End Time: {transcript.get('end_time')}")
        
        # Start offset (relative to beginning of audio)
        start_offset = transcript.get('start_offset', {})
        if start_offset:
            print(f"Start Offset: {start_offset.get('hours')}h {start_offset.get('minutes')}m {start_offset.get('seconds')}s")
        
        # End offset (relative to beginning of audio)
        end_offset = transcript.get('end_offset', {})
        if end_offset:
            print(f"End Offset: {end_offset.get('hours')}h {end_offset.get('minutes')}m {end_offset.get('seconds')}s")
        
        print("---")
else:
    print(f"Failed to get transcript: {response.status_code}")
    print(response.json())

Headers

sdp_suki_token
string
required

Path Parameters

ambient_session_id
string
required

Response

final_transcript
object[]