Retrieve Transcription Results
Get the completed transcript with timestamps and speaker information.
Endpoint
GET /api/v3/stt/{id}/result
Request
Path Parameters
| Parameter | Type | Description |
|---|---|---|
id | string | Job ID |
Response
{
"id": "stt_abc123",
"document_id": 456,
"status": "completed",
"language": "en",
"duration_seconds": 3600,
"transcript": "Hello, welcome to today's meeting. Let's begin with the agenda...",
"segments": [
{
"start": 0.0,
"end": 2.5,
"text": "Hello, welcome to today's meeting.",
"speaker": "Speaker 1",
"confidence": 0.95
},
{
"start": 2.5,
"end": 5.0,
"text": "Let's begin with the agenda.",
"speaker": "Speaker 1",
"confidence": 0.93
}
],
"speakers": [
{
"id": "Speaker 1",
"segments_count": 45
},
{
"id": "Speaker 2",
"segments_count": 38
}
]
}
Response Fields
| Field | Type | Description |
|---|---|---|
id | string | Job ID |
document_id | integer | Document ID (for further editing) |
transcript | string | Full transcript text |
segments | array | Timestamped segments |
speakers | array | Speaker information (if diarization enabled) |
Segment Fields
| Field | Type | Description |
|---|---|---|
start | float | Start time (seconds) |
end | float | End time (seconds) |
text | string | Segment text |
speaker | string | Speaker ID (if diarization enabled) |
confidence | float | Confidence score (0-1) |
Examples
cURL
curl https://api.scriptix.io/api/v3/stt/stt_abc123/result \
-H "Authorization: Bearer YOUR_API_KEY"
Python
response = requests.get(
'https://api.scriptix.io/api/v3/stt/stt_abc123/result',
headers={'Authorization': 'Bearer YOUR_API_KEY'}
)
result = response.json()
print("Transcript:")
print(result['transcript'])
print("\nSegments:")
for segment in result['segments']:
print(f"[{segment['start']:.1f}s - {segment['end']:.1f}s] {segment['speaker']}: {segment['text']}")
Export to SRT
def export_to_srt(segments, output_file):
with open(output_file, 'w', encoding='utf-8') as f:
for i, segment in enumerate(segments, 1):
start = format_timestamp(segment['start'])
end = format_timestamp(segment['end'])
f.write(f"{i}\n")
f.write(f"{start} --> {end}\n")
f.write(f"{segment['text']}\n\n")
def format_timestamp(seconds):
hours = int(seconds // 3600)
minutes = int((seconds % 3600) // 60)
secs = int(seconds % 60)
millis = int((seconds % 1) * 1000)
return f"{hours:02d}:{minutes:02d}:{secs:02d},{millis:03d}"
# Usage
export_to_srt(result['segments'], 'transcript.srt')
Document Editing
Use document_id to edit transcript in the Documents API:
curl https://api.scriptix.io/api/v3/documents/456 \
-H "Authorization: Bearer YOUR_API_KEY"
See Documents API.