response = json.decode([[
{"language": "en", "segments": [{"id": 1, "seek": 2203, "start": 0.0, "end": 4.68, "text": " Don't worry about it, but maybe I will fill out one of those suggestion cards after all.", "tokens": [50364, 1468, 380, 3292, 466, 309, 11, 457, 1310, 286, 486, 2836, 484, 472, 295, 729, 16541, 5632, 934, 439, 13, 50604], "temperature": 0.0, "avg_logprob": -0.20203689297476968, "compression_ratio": 1.5044247787610618, "no_speech_prob": 0.01001946534961462, "words": [{"start": 0.0, "end": 0.48, "word": " Don't", "probability": 0.9738937318325043}, {"start": 0.48, "end": 0.72, "word": " worry", "probability": 0.9985054731369019}, {"start": 0.72, "end": 0.94, "word": " about", "probability": 0.9956048727035522}, {"start": 0.94, "end": 1.2, "word": " it,", "probability": 0.9958335161209106}, {"start": 1.46, "end": 1.68, "word": " but", "probability": 0.9893428087234497}, {"start": 1.68, "end": 2.06, "word": " maybe", "probability": 0.985736072063446}, {"start": 2.06, "end": 2.2, "word": " I", "probability": 0.9841459393501282}, {"start": 2.2, "end": 2.36, "word": " will", "probability": 0.9575523734092712}, {"start": 2.36, "end": 2.54, "word": " fill", "probability": 0.9963791966438293}, {"start": 2.54, "end": 2.68, "word": " out", "probability": 0.9883477091789246}, {"start": 2.68, "end": 2.84, "word": " one", "probability": 0.9910874962806702}, {"start": 2.84, "end": 2.9, "word": " of", "probability": 0.9967635869979858}, {"start": 2.9, "end": 3.2, "word": " those", "probability": 0.9798358678817749}, {"start": 3.2, "end": 3.64, "word": " suggestion", "probability": 0.9172356724739075}, {"start": 3.64, "end": 4.0, "word": " cards", "probability": 0.9973626732826233}, {"start": 4.0, "end": 4.44, "word": " after", "probability": 0.8614948391914368}, {"start": 4.44, "end": 4.68, "word": " all.", "probability": 0.982586681842804}]}, {"id": 2, "seek": 2203, "start": 5.02, "end": 7.66, "text": " You need to rearrange your store and hire more people.", "tokens": [50604, 509, 643, 281, 39568, 428, 3531, 293, 11158, 544, 561, 13, 50748], "temperature": 0.0, "avg_logprob": -0.20203689297476968, "compression_ratio": 1.5044247787610618, "no_speech_prob": 0.01001946534961462, "words": [{"start": 5.02, "end": 5.2, "word": " You", "probability": 0.9949402809143066}, {"start": 5.2, "end": 5.4, "word": " need", "probability": 0.9888043999671936}, {"start": 5.4, "end": 5.68, "word": " to", "probability": 0.995278000831604}, {"start": 5.68, "end": 6.02, "word": " rearrange", "probability": 0.9680283069610596}, {"start": 6.02, "end": 6.34, "word": " your", "probability": 0.9937660694122314}, {"start": 6.34, "end": 6.48, "word": " store", "probability": 0.9905586242675781}, {"start": 6.48, "end": 6.72, "word": " and", "probability": 0.9858508706092834}, {"start": 6.72, "end": 6.92, "word": " hire", "probability": 0.9985997080802917}, {"start": 6.92, "end": 7.16, "word": " more", "probability": 0.9978284239768982}, {"start": 7.16, "end": 7.66, "word": " people.", "probability": 0.9991713762283325}]}, {"id": 3, "seek": 2203, "start": 8.2, "end": 11.26, "text": " Haha, sounds good to me. Good luck finding that book.", "tokens": [50748, 19131, 11, 3263, 665, 281, 385, 13, 2205, 3668, 5006, 300, 1446, 13, 50940], "temperature": 0.0, "avg_logprob": -0.20203689297476968, "compression_ratio": 1.5044247787610618, "no_speech_prob": 0.01001946534961462, "words": [{"start": 8.2, "end": 8.42, "word": " Haha,", "probability": 0.12257678806781769}, {"start": 8.8, "end": 9.04, "word": " sounds", "probability": 0.9721860885620117}, {"start": 9.04, "end": 9.24, "word": " good", "probability": 0.9988430738449097}, {"start": 9.24, "end": 9.44, "word": " to", "probability": 0.9985108971595764}, {"start": 9.44, "end": 9.66, "word": " me.", "probability": 0.9993407130241394}, {"start": 10.0, "end": 10.18, "word": " Good", "probability": 0.9959205389022827}, {"start": 10.18, "end": 10.38, "word": " luck", "probability": 0.9987674951553345}, {"start": 10.38, "end": 10.68, "word": " finding", "probability": 0.9981703758239746}, {"start": 10.68, "end": 11.02, "word": " that", "probability": 0.9961445331573486}, {"start": 11.02, "end": 11.26, "word": " book.", "probability": 0.9984509944915771}]}, {"id": 4, "seek": 2203, "start": 11.78, "end": 12.24, "text": " Thanks.", "tokens": [50940, 2561, 13, 50992], "temperature": 0.0, "avg_logprob": -0.20203689297476968, "compression_ratio": 1.5044247787610618, "no_speech_prob": 0.01001946534961462, "words": [{"start": 11.78, "end": 12.24, "word": " Thanks.", "probability": 0.9695364832878113}]}, {"id": 5, "seek": 2203, "start": 12.9, "end": 16.16, "text": " You're welcome. Okay, who's the next person in line?", "tokens": [50992, 509, 434, 2928, 13, 1033, 11, 567, 311, 264, 958, 954, 294, 1622, 30, 51164], "temperature": 0.0, "avg_logprob": -0.20203689297476968, "compression_ratio": 1.5044247787610618, "no_speech_prob": 0.01001946534961462, "words": [{"start": 12.9, "end": 13.12, "word": " You're", "probability": 0.9849036931991577}, {"start": 13.12, "end": 13.38, "word": " welcome.", "probability": 0.9983079433441162}, {"start": 14.12, "end": 14.5, "word": " Okay,", "probability": 0.7263695001602173}, {"start": 14.86, "end": 15.2, "word": " who's", "probability": 0.9723688066005707}, {"start": 15.2, "end": 15.3, "word": " the", "probability": 0.9945037364959717}, {"start": 15.3, "end": 15.44, "word": " next", "probability": 0.9980334639549255}, {"start": 15.44, "end": 15.74, "word": " person", "probability": 0.9987584352493286}, {"start": 15.74, "end": 15.98, "word": " in", "probability": 0.9971809387207031}, {"start": 15.98, "end": 16.16, "word": " line?", "probability": 0.9988143444061279}]}, {"id": 6, "seek": 2203, "start": 18.49, "end": 22.87, "text": " Now get ready to answer the questions. You may use your notes to help you answer.", "tokens": [51200, 823, 483, 1919, 281, 1867, 264, 1651, 13, 509, 815, 764, 428, 5570, 281, 854, 291, 1867, 13, 51428], "temperature": 0.0, "avg_logprob": -0.20203689297476968, "compression_ratio": 1.5044247787610618, "no_speech_prob": 0.01001946534961462, "words": [{"start": 18.49, "end": 18.75, "word": " Now", "probability": 0.9738929867744446}, {"start": 18.75, "end": 18.97, "word": " get", "probability": 0.9094610810279846}, {"start": 18.97, "end": 19.21, "word": " ready", "probability": 0.9989386200904846}, {"start": 19.21, "end": 19.51, "word": " to", "probability": 0.9987198114395142}, {"start": 19.51, "end": 19.75, "word": " answer", "probability": 0.9979331493377686}, {"start": 19.75, "end": 19.95, "word": " the", "probability": 0.995278000831604}, {"start": 19.95, "end": 20.33, "word": " questions.", "probability": 0.9946743249893188}, {"start": 20.95, "end": 21.09, "word": " You", "probability": 0.9968999624252319}, {"start": 21.09, "end": 21.27, "word": " may", "probability": 0.9985644221305847}, {"start": 21.27, "end": 21.47, "word": " use", "probability": 0.9987497329711914}, {"start": 21.47, "end": 21.77, "word": " your", "probability": 0.9975970387458801}, {"start": 21.77, "end": 21.99, "word": " notes", "probability": 0.9959502220153809}, {"start": 21.99, "end": 22.21, "word": " to", "probability": 0.9991000890731812}, {"start": 22.21, "end": 22.33, "word": " help", "probability": 0.998537540435791}, {"start": 22.33, "end": 22.55, "word": " you", "probability": 0.9948883652687073}, {"start": 22.55, "end": 22.87, "word": " answer.", "probability": 0.9985874891281128}]}], "text": " Don't worry about it, but maybe I will fill out one of those suggestion cards after all. You need to rearrange your store and hire more people. Haha, sounds good to me. Good luck finding that book. Thanks. You're welcome. Okay, who's the next person in line? Now get ready to answer the questions. You may use your notes to help you answer."}
]])

local transcript = Transcript.new {
  name = 'Sample Transcript',
}

for _, segment in pairs(response.segments) do
  for _, s in pairs(TranscriptSegment.from_whisper(segment, {}, {})) do
    transcript:add_segment(s)
  end
end

transcript:update()
app.plugins:add_plugin(TranscriptUI.new { transcript = transcript })
