[{"data":1,"prerenderedAt":417},["ShallowReactive",2],{"navigation":3,"\u002Fdocs\u002Frecorded\u002Fsubtitles":235,"surround-\u002Fdocs\u002Frecorded\u002Fsubtitles":414},[4],{"title":5,"path":6,"stem":7,"children":8,"page":18},"Docs","\u002Fdocs","docs",[9,33,68,95,130,161,208],{"title":10,"path":11,"stem":12,"children":13,"page":18,"type":32},"Start","\u002Fdocs\u002Fstart","docs\u002F1.start",[14,20,24,28],{"title":15,"path":16,"stem":17,"new":18,"type":19,"children":-1},"Get started with Lanson Live API","\u002Fdocs\u002Fstart\u002Fquickstart","docs\u002F1.start\u002F2.quickstart",false,"page",{"title":21,"path":22,"stem":23,"new":18,"type":19,"children":-1},"Authentication","\u002Fdocs\u002Fstart\u002Fauthentication","docs\u002F1.start\u002F3.authentication",{"title":25,"path":26,"stem":27,"new":18,"type":19,"children":-1},"Choose an API","\u002Fdocs\u002Fstart\u002Fchoose-an-api","docs\u002F1.start\u002F5.choose-an-api",{"title":29,"path":30,"stem":31,"new":18,"type":19,"children":-1},"Pricing","\u002Fdocs\u002Fstart\u002Fpricing","docs\u002F1.start\u002F6.pricing","group",{"title":34,"path":35,"stem":36,"children":37,"new":18,"type":32},"Realtime","\u002Fdocs\u002Frealtime","docs\u002F2.realtime\u002F1.index",[38,40,44,48,52,56,60,64],{"title":39,"path":35,"stem":36,"new":18,"type":19,"children":-1},"Realtime Overview",{"title":41,"path":42,"stem":43,"new":18,"type":19,"children":-1},"Realtime Quickstart","\u002Fdocs\u002Frealtime\u002Fquickstart","docs\u002F2.realtime\u002F2.quickstart",{"title":45,"path":46,"stem":47,"new":18,"type":19,"children":-1},"Connection Lifecycle","\u002Fdocs\u002Frealtime\u002Fconnection-lifecycle","docs\u002F2.realtime\u002F3.connection-lifecycle",{"title":49,"path":50,"stem":51,"new":18,"type":19,"children":-1},"Audio Input","\u002Fdocs\u002Frealtime\u002Faudio-input","docs\u002F2.realtime\u002F4.audio-input",{"title":53,"path":54,"stem":55,"new":18,"type":19,"children":-1},"Transcript Lifecycle","\u002Fdocs\u002Frealtime\u002Ftranscript-lifecycle","docs\u002F2.realtime\u002F5.transcript-lifecycle",{"title":57,"path":58,"stem":59,"new":18,"type":19,"children":-1},"Realtime Translation","\u002Fdocs\u002Frealtime\u002Frealtime-translation","docs\u002F2.realtime\u002F6.realtime-translation",{"title":61,"path":62,"stem":63,"new":18,"type":19,"children":-1},"Session Configuration","\u002Fdocs\u002Frealtime\u002Fsession-configuration","docs\u002F2.realtime\u002F7.session-configuration",{"title":65,"path":66,"stem":67,"new":18,"type":19,"children":-1},"Handling Interruptions & Silence","\u002Fdocs\u002Frealtime\u002Finterruptions-silence","docs\u002F2.realtime\u002F8.interruptions-silence",{"title":69,"path":70,"stem":71,"children":72,"new":18,"type":32},"Recorded","\u002Fdocs\u002Frecorded","docs\u002F3.recorded\u002F1.index",[73,75,79,83,87,91],{"title":74,"path":70,"stem":71,"new":18,"type":19,"children":-1},"Recorded Overview",{"title":76,"path":77,"stem":78,"new":18,"type":19,"children":-1},"Transcribe Audio","\u002Fdocs\u002Frecorded\u002Ftranscribe-audio","docs\u002F3.recorded\u002F2.transcribe-audio",{"title":80,"path":81,"stem":82,"new":18,"type":19,"children":-1},"Timestamps & Speakers","\u002Fdocs\u002Frecorded\u002Ftimestamps-speakers","docs\u002F3.recorded\u002F3.timestamps-speakers",{"title":84,"path":85,"stem":86,"new":18,"type":19,"children":-1},"Subtitles","\u002Fdocs\u002Frecorded\u002Fsubtitles","docs\u002F3.recorded\u002F4.subtitles",{"title":88,"path":89,"stem":90,"new":18,"type":19,"children":-1},"Recorded Translation","\u002Fdocs\u002Frecorded\u002Ftranslation","docs\u002F3.recorded\u002F5.translation",{"title":92,"path":93,"stem":94,"new":18,"type":19,"children":-1},"Structured Results","\u002Fdocs\u002Frecorded\u002Fstructured-results","docs\u002F3.recorded\u002F6.structured-results",{"title":96,"path":97,"stem":98,"children":99,"new":18,"type":32},"Concepts","\u002Fdocs\u002Fconcepts","docs\u002F4.concepts\u002F1.index",[100,102,106,110,114,118,122,126],{"title":101,"path":97,"stem":98,"new":18,"type":19,"children":-1},"Voice Context Layer",{"title":103,"path":104,"stem":105,"new":18,"type":19,"children":-1},"Stable vs. Partial Text","\u002Fdocs\u002Fconcepts\u002Fstable-vs-partial-text","docs\u002F4.concepts\u002F2.stable-vs-partial-text",{"title":107,"path":108,"stem":109,"new":18,"type":19,"children":-1},"StableStream™","\u002Fdocs\u002Fconcepts\u002Fstablestream","docs\u002F4.concepts\u002F3.stablestream",{"title":111,"path":112,"stem":113,"new":18,"type":19,"children":-1},"Context-Aware Processing","\u002Fdocs\u002Fconcepts\u002Fcontext-aware-processing","docs\u002F4.concepts\u002F4.context-aware-processing",{"title":115,"path":116,"stem":117,"new":18,"type":19,"children":-1},"Understanding Latency","\u002Fdocs\u002Fconcepts\u002Flatency","docs\u002F4.concepts\u002F5.latency",{"title":119,"path":120,"stem":121,"new":18,"type":19,"children":-1},"Live Translation","\u002Fdocs\u002Fconcepts\u002Flive-translation","docs\u002F4.concepts\u002F6.live-translation",{"title":123,"path":124,"stem":125,"new":18,"type":19,"children":-1},"Trinity Engine","\u002Fdocs\u002Fconcepts\u002Ftrinity-engine","docs\u002F4.concepts\u002F7.trinity-engine",{"title":127,"path":128,"stem":129,"new":18,"type":19,"children":-1},"LiveFinal™","\u002Fdocs\u002Fconcepts\u002Flivefinal","docs\u002F4.concepts\u002F8.livefinal",{"title":131,"path":132,"stem":133,"children":134,"new":18,"type":32},"Guides","\u002Fdocs\u002Fguides","docs\u002F5.guides\u002F1.index",[135,137,141,145,149,153,157],{"title":136,"path":132,"stem":133,"new":18,"type":19,"children":-1},"Browser Live Captions",{"title":138,"path":139,"stem":140,"new":18,"type":19,"children":-1},"Server-side Streaming","\u002Fdocs\u002Fguides\u002Fserver-side-streaming","docs\u002F5.guides\u002F2.server-side-streaming",{"title":142,"path":143,"stem":144,"new":18,"type":19,"children":-1},"Build a Stable Caption UI","\u002Fdocs\u002Fguides\u002Fstable-caption-ui","docs\u002F5.guides\u002F3.stable-caption-ui",{"title":146,"path":147,"stem":148,"new":18,"type":19,"children":-1},"Build Live Translation","\u002Fdocs\u002Fguides\u002Flive-translation","docs\u002F5.guides\u002F4.live-translation",{"title":150,"path":151,"stem":152,"new":18,"type":19,"children":-1},"Save a Transcript","\u002Fdocs\u002Fguides\u002Fsave-transcript","docs\u002F5.guides\u002F5.save-transcript",{"title":154,"path":155,"stem":156,"new":18,"type":19,"children":-1},"Reconnect a Live Session","\u002Fdocs\u002Fguides\u002Freconnection","docs\u002F5.guides\u002F6.reconnection",{"title":158,"path":159,"stem":160,"new":18,"type":19,"children":-1},"Client-VAD speech segments","\u002Fdocs\u002Fguides\u002Fclient-vad-segments","docs\u002F5.guides\u002F7.client-vad-segments",{"title":162,"path":163,"stem":164,"children":165,"new":18,"type":32},"API Reference","\u002Fdocs\u002Fapi-reference","docs\u002F6.api-reference\u002F1.index",[166,168,172,176,180,184,188,192,196,200,204],{"title":167,"path":163,"stem":164,"new":18,"type":19,"children":-1},"API Reference Overview",{"title":169,"path":170,"stem":171,"new":18,"type":19,"children":-1},"Realtime API","\u002Fdocs\u002Fapi-reference\u002Frealtime-api","docs\u002F6.api-reference\u002F2.realtime-api",{"title":173,"path":174,"stem":175,"new":18,"type":19,"children":-1},"Client Messages","\u002Fdocs\u002Fapi-reference\u002Fclient-messages","docs\u002F6.api-reference\u002F3.client-messages",{"title":177,"path":178,"stem":179,"new":18,"type":19,"children":-1},"Server Events","\u002Fdocs\u002Fapi-reference\u002Fserver-events","docs\u002F6.api-reference\u002F4.server-events",{"title":181,"path":182,"stem":183,"new":18,"type":19,"children":-1},"Segment Transcription API","\u002Fdocs\u002Fapi-reference\u002Fsegment-transcription","docs\u002F6.api-reference\u002F5.segment-transcription",{"title":185,"path":186,"stem":187,"new":18,"type":19,"children":-1},"Batch Transcription Jobs","\u002Fdocs\u002Fapi-reference\u002Fbatch-jobs","docs\u002F6.api-reference\u002F6.batch-jobs",{"title":189,"path":190,"stem":191,"new":18,"type":19,"children":-1},"Languages & Models","\u002Fdocs\u002Fapi-reference\u002Flanguages","docs\u002F6.api-reference\u002F7.languages",{"title":193,"path":194,"stem":195,"new":18,"type":19,"children":-1},"Errors","\u002Fdocs\u002Fapi-reference\u002Ferrors","docs\u002F6.api-reference\u002F8.errors",{"title":197,"path":198,"stem":199,"new":18,"type":19,"children":-1},"Rate Limits","\u002Fdocs\u002Fapi-reference\u002Frate-limits","docs\u002F6.api-reference\u002F9.rate-limits",{"title":201,"path":202,"stem":203,"new":18,"type":19,"children":-1},"Admin API","\u002Fdocs\u002Fapi-reference\u002Fadmin","docs\u002F6.api-reference\u002F10.admin",{"title":205,"path":206,"stem":207,"new":18,"type":19,"children":-1},"Language Detection","\u002Fdocs\u002Fapi-reference\u002Flanguage-detection","docs\u002F6.api-reference\u002F11.language-detection",{"title":209,"path":210,"stem":211,"children":212,"new":18,"type":32},"Production","\u002Fdocs\u002Fproduction","docs\u002F7.production\u002F1.index",[213,215,219,223,227,231],{"title":214,"path":210,"stem":211,"new":18,"type":19,"children":-1},"Production Checklist",{"title":216,"path":217,"stem":218,"new":18,"type":19,"children":-1},"Reconnection & Retries","\u002Fdocs\u002Fproduction\u002Freconnection-retries","docs\u002F7.production\u002F2.reconnection-retries",{"title":220,"path":221,"stem":222,"new":18,"type":19,"children":-1},"Latency Best Practices","\u002Fdocs\u002Fproduction\u002Flatency-best-practices","docs\u002F7.production\u002F3.latency-best-practices",{"title":224,"path":225,"stem":226,"new":18,"type":19,"children":-1},"Security & Privacy","\u002Fdocs\u002Fproduction\u002Fsecurity-privacy","docs\u002F7.production\u002F4.security-privacy",{"title":228,"path":229,"stem":230,"new":18,"type":19,"children":-1},"Data Retention","\u002Fdocs\u002Fproduction\u002Fdata-retention","docs\u002F7.production\u002F5.data-retention",{"title":232,"path":233,"stem":234,"new":18,"type":19,"children":-1},"Changelog","\u002Fdocs\u002Fproduction\u002Fchangelog","docs\u002F7.production\u002F6.changelog",{"id":236,"title":84,"body":237,"description":406,"extension":407,"links":408,"meta":409,"navigation":410,"new":18,"path":85,"rawbody":411,"seo":412,"stem":86,"technology":408,"__hash__":413},"content\u002Fdocs\u002F3.recorded\u002F4.subtitles.md",{"type":238,"value":239,"toc":394},"minimark",[240,244,249,252,263,268,276,280,286,290,340,344,352,356,372,376],[241,242,243],"p",{},"Generate subtitle files from transcription result timestamps.",[245,246,248],"h2",{"id":247},"from-transcription-results-to-subtitles","From transcription results to subtitles",[241,250,251],{},"Segment data from a completed transcription can be directly converted to SRT or VTT:",[253,254,260],"pre",{"className":255,"code":257,"language":258,"meta":259},[256],"language-json","{\n  \"segments\": [\n    { \"id\": 0, \"start_time\": 0.0, \"end_time\": 3.2, \"text\": \"The weather is nice today\" },\n    { \"id\": 1, \"start_time\": 3.5, \"end_time\": 8.1, \"text\": \"It might rain tomorrow\" }\n  ]\n}\n","json","",[261,262,257],"code",{"__ignoreMap":259},[264,265,267],"h3",{"id":266},"srt-format","SRT format",[253,269,274],{"className":270,"code":272,"language":273},[271],"language-text","1\n00:00:00,000 --> 00:00:03,200\nThe weather is nice today\n\n2\n00:00:03,500 --> 00:00:08,100\nIt might rain tomorrow\n","text",[261,275,272],{"__ignoreMap":259},[264,277,279],{"id":278},"vtt-format","VTT format",[253,281,284],{"className":282,"code":283,"language":273},[271],"WEBVTT\n\n00:00:00.000 --> 00:00:03.200\nThe weather is nice today\n\n00:00:03.500 --> 00:00:08.100\nIt might rain tomorrow\n",[261,285,283],{"__ignoreMap":259},[245,287,289],{"id":288},"time-format-conversion","Time format conversion",[291,292,293,306],"table",{},[294,295,296],"thead",{},[297,298,299,303],"tr",{},[300,301,302],"th",{},"Format",[300,304,305],{},"Time notation",[307,308,309,321,332],"tbody",{},[297,310,311,315],{},[312,313,314],"td",{},"SRT",[312,316,317,320],{},[261,318,319],{},"HH:MM:SS,mmm"," (comma for milliseconds)",[297,322,323,326],{},[312,324,325],{},"VTT",[312,327,328,331],{},[261,329,330],{},"HH:MM:SS.mmm"," (dot for milliseconds)",[297,333,334,337],{},[312,335,336],{},"API",[312,338,339],{},"Seconds (float)",[245,341,343],{"id":342},"conversion-function","Conversion function",[253,345,350],{"className":346,"code":348,"language":349,"meta":259},[347],"language-python","def seconds_to_srt(seconds):\n    h = int(seconds \u002F\u002F 3600)\n    m = int((seconds % 3600) \u002F\u002F 60)\n    s = int(seconds % 60)\n    ms = int((seconds % 1) * 1000)\n    return f\"{h:02d}:{m:02d}:{s:02d},{ms:03d}\"\n\ndef generate_srt(segments):\n    lines = []\n    for i, seg in enumerate(segments, 1):\n        lines.append(str(i))\n        lines.append(f\"{seconds_to_srt(seg['start_time'])} --> {seconds_to_srt(seg['end_time'])}\")\n        lines.append(seg['text'])\n        lines.append(\"\")\n    return \"\\n\".join(lines)\n","python",[261,351,348],{"__ignoreMap":259},[245,353,355],{"id":354},"segmentation-rules","Segmentation rules",[357,358,359,363,366,369],"ul",{},[360,361,362],"li",{},"Each API segment maps to one subtitle entry",[360,364,365],{},"Gaps between segments naturally become subtitle breaks",[360,367,368],{},"No additional subtitle length limits are imposed by the API",[360,370,371],{},"For traditional subtitle formatting (character-per-line limits), split long segments client-side",[245,373,375],{"id":374},"related","Related",[357,377,378,384,389],{},[360,379,380,383],{},[381,382,80],"a",{"href":81}," — timestamp reference",[360,385,386,388],{},[381,387,76],{"href":77}," — get transcription results",[360,390,391,393],{},[381,392,150],{"href":151}," — persistence guide",{"title":259,"searchDepth":395,"depth":395,"links":396},2,[397,402,403,404,405],{"id":247,"depth":395,"text":248,"children":398},[399,401],{"id":266,"depth":400,"text":267},3,{"id":278,"depth":400,"text":279},{"id":288,"depth":395,"text":289},{"id":342,"depth":395,"text":343},{"id":354,"depth":395,"text":355},{"id":374,"depth":395,"text":375},"Generate SRT \u002F VTT subtitle files from transcription results.","md",null,{},true,"---\ntitle: Subtitles\ndescription: Generate SRT \u002F VTT subtitle files from transcription results.\n---\nGenerate subtitle files from transcription result timestamps.\n\n## From transcription results to subtitles\n\nSegment data from a completed transcription can be directly converted to SRT or VTT:\n\n```json\n{\n  \"segments\": [\n    { \"id\": 0, \"start_time\": 0.0, \"end_time\": 3.2, \"text\": \"The weather is nice today\" },\n    { \"id\": 1, \"start_time\": 3.5, \"end_time\": 8.1, \"text\": \"It might rain tomorrow\" }\n  ]\n}\n```\n\n### SRT format\n\n```\n1\n00:00:00,000 --> 00:00:03,200\nThe weather is nice today\n\n2\n00:00:03,500 --> 00:00:08,100\nIt might rain tomorrow\n```\n\n### VTT format\n\n```\nWEBVTT\n\n00:00:00.000 --> 00:00:03.200\nThe weather is nice today\n\n00:00:03.500 --> 00:00:08.100\nIt might rain tomorrow\n```\n\n## Time format conversion\n\n| Format | Time notation |\n|---|---|\n| SRT | `HH:MM:SS,mmm` (comma for milliseconds) |\n| VTT | `HH:MM:SS.mmm` (dot for milliseconds) |\n| API | Seconds (float) |\n\n## Conversion function\n\n```python\ndef seconds_to_srt(seconds):\n    h = int(seconds \u002F\u002F 3600)\n    m = int((seconds % 3600) \u002F\u002F 60)\n    s = int(seconds % 60)\n    ms = int((seconds % 1) * 1000)\n    return f\"{h:02d}:{m:02d}:{s:02d},{ms:03d}\"\n\ndef generate_srt(segments):\n    lines = []\n    for i, seg in enumerate(segments, 1):\n        lines.append(str(i))\n        lines.append(f\"{seconds_to_srt(seg['start_time'])} --> {seconds_to_srt(seg['end_time'])}\")\n        lines.append(seg['text'])\n        lines.append(\"\")\n    return \"\\n\".join(lines)\n```\n\n## Segmentation rules\n\n- Each API segment maps to one subtitle entry\n- Gaps between segments naturally become subtitle breaks\n- No additional subtitle length limits are imposed by the API\n- For traditional subtitle formatting (character-per-line limits), split long segments client-side\n\n## Related\n\n- [Timestamps & Speakers](\u002Fdocs\u002Frecorded\u002Ftimestamps-speakers) — timestamp reference\n- [Transcribe Audio](\u002Fdocs\u002Frecorded\u002Ftranscribe-audio) — get transcription results\n- [Save a Transcript](\u002Fdocs\u002Fguides\u002Fsave-transcript) — persistence guide\n",{"title":84,"description":406},"fk7R7pV1PC0e9NYV3yx2Mgrqlf4VOT1QdNPKAPMXUMA",[415,416],{"title":80,"path":81,"stem":82,"children":-1},{"title":88,"path":89,"stem":90,"children":-1},1795064385099]