Skip to content

Instantly share code, notes, and snippets.

@remorses
Last active November 23, 2025 14:24
Show Gist options
  • Select an option

  • Save remorses/f38f9d9932ddc31b2811521d285687fb to your computer and use it in GitHub Desktop.

Select an option

Save remorses/f38f9d9932ddc31b2811521d285687fb to your computer and use it in GitHub Desktop.
Cartesia websocket speech to text timestamps drift
Audio Stats:
- Sample Rate: 16000 Hz (Fixed)
- Duration: 192.783 s
- Samples: 3084534
[1/3] Running Batch API (Reference)...
stdout | website/src/lib/cartesia-stt.test.ts > Cartesia STT Timestamp Debugging > compares Batch API vs WebSocket API timestamps
Batch finished. Found 439 words.
[2/3] Running WebSocket API (Streaming)...
stdout | website/src/lib/cartesia-stt.test.ts > Cartesia STT Timestamp Debugging > compares Batch API vs WebSocket API timestamps
Streaming in 8192-sample chunks...
stdout | website/src/lib/cartesia-stt.test.ts > Cartesia STT Timestamp Debugging > compares Batch API vs WebSocket API timestamps
[3/3] Results Comparison (Showing significant diffs > 0.1s)
-----------------------------------------------------------------------------------------------------
Index Word Batch Start WS Raw Start Diff (Raw-Batch)
-----------------------------------------------------------------------------------------------------
0 Yo, 0.240 0.264 +0.024
1 my 1.080 1.064 -0.016
2 name 1.220 1.224 +0.004
3 is 1.400 1.404 +0.004
4 Benjamin 1.780 1.784 +0.004
12 So, 6.160 6.592 +0.432
13 without 7.120 6.812 -0.308
20 As 10.120 10.656 +0.536
35 And 16.040 16.768 +0.728
46 I 21.000 21.504 +0.504
50 into 22.580 22.584 +0.004
59 As 25.560 25.152 -0.408
62 see 26.920 26.816 -0.104
63 we 27.160 26.936 -0.224
64 have 27.380 27.156 -0.224
65 a 27.640 27.376 -0.264
66 bunch 27.820 27.656 -0.164
67 of 28.120 27.816 -0.304
68 different 28.320 28.136 -0.184
69 variants 28.680 28.336 -0.344
70 here 29.320 28.656 -0.664
71 starting 29.680 29.316 -0.364
72 with 30.120 29.676 -0.444
73 a 30.400 30.116 -0.284
74 pressed 30.680 30.436 -0.244
75 variant 31.120 30.696 -0.424
76 that 31.560 31.232 -0.328
77 simply 32.300 31.692 -0.608
78 scales 32.680 32.312 -0.368
79 down 33.180 32.692 -0.488
80 the 33.560 33.212 -0.348
81 circle 33.820 33.572 -0.248
82 on 34.220 33.832 -0.388
83 mouse 34.540 34.212 -0.328
84 down. 34.960 34.552 -0.408
85 And 35.580 34.972 -0.608
87 there's 37.280 37.092 -0.188
88 a 37.580 37.272 -0.308
90 variants 37.800 37.652 -0.148
91 where 38.340 37.792 -0.548
92 we 38.600 38.332 -0.268
93 show 38.820 38.612 -0.208
94 these 39.260 38.832 -0.428
95 different 39.680 39.272 -0.408
96 titles 40.020 39.672 -0.348
97 of 40.500 40.032 -0.468
98 sites 40.820 40.492 -0.328
99 made 41.240 40.832 -0.408
100 in 41.760 41.504 -0.256
101 Framer. 42.040 41.804 -0.236
102 And 43.750 42.024 -1.726
113 Specifically, 48.350 48.576 +0.226
114 as 49.610 49.216 -0.394
118 I 51.510 52.240 +0.730
126 And 54.830 57.184 +2.354
138 cursor 60.810 61.024 +0.214
139 to 61.210 61.324 +0.114
144 So 63.570 64.160 +0.590
150 first 65.310 65.320 +0.010
162 our 71.705 72.192 +0.487
165 And 73.865 74.464 +0.599
175 in 77.685 78.432 +0.747
179 Here 80.345 80.960 +0.615
194 or 87.125 87.648 +0.523
200 I'll 90.645 90.668 +0.023
205 and 92.665 93.504 +0.839
217 So 97.865 98.304 +0.439
221 to 99.785 100.512 +0.727
222 select 100.585 100.852 +0.267
223 the 100.865 101.112 +0.247
224 component 101.125 101.592 +0.467
225 we 101.605 101.852 +0.247
226 just 101.845 102.152 +0.307
227 looked 102.165 102.492 +0.327
228 at 102.485 102.772 +0.287
229 and 102.765 103.512 +0.747
230 then 103.505 103.792 +0.287
231 once 103.785 104.352 +0.567
232 selected 104.345 104.892 +0.547
233 I 104.885 105.332 +0.447
234 can 105.325 105.472 +0.147
235 pick 105.465 105.712 +0.247
236 any 105.725 106.092 +0.367
237 variant 106.085 106.572 +0.487
238 to 106.565 106.892 +0.327
239 start 106.905 107.332 +0.427
240 with. 107.325 108.640 +1.315
241 So 108.125 108.740 +0.615
242 the 108.745 108.920 +0.175
243 default 108.905 109.320 +0.415
244 is 109.305 109.540 +0.235
245 just 109.545 109.800 +0.255
246 fine. 109.785 110.520 +0.735
247 And 110.505 111.060 +0.555
248 then 111.065 111.180 +0.115
249 we 111.165 111.320 +0.155
250 can 111.305 111.480 +0.175
251 decide 111.485 111.900 +0.415
252 to 111.885 112.180 +0.295
253 either 112.185 112.520 +0.335
254 have 112.525 112.840 +0.315
255 it 112.805 113.280 +0.475
256 follow 112.985 113.540 +0.555
257 the 113.485 113.840 +0.355
258 existing 113.825 114.360 +0.535
259 cursor 114.365 114.860 +0.495
260 or 114.865 115.520 +0.655
261 to 115.485 115.700 +0.215
262 replace 115.685 116.160 +0.475
263 it 116.165 116.380 +0.215
264 entirely 116.365 116.832 +0.467
265 and 117.065 117.792 +0.727
270 which 118.985 119.452 +0.467
277 So 121.425 120.892 -0.533
278 I'll 121.765 121.472 -0.293
279 close 122.005 121.772 -0.233
280 this 122.505 122.012 -0.493
281 pop 122.905 122.512 -0.393
282 out 123.225 122.912 -0.313
283 and 123.465 123.212 -0.253
284 let's 123.805 123.492 -0.313
285 give 124.205 123.812 -0.393
286 this 124.405 124.212 -0.193
287 a 124.785 124.412 -0.373
288 preview. 125.105 124.928 -0.177
289 As 125.905 125.108 -0.797
290 you 126.525 126.008 -0.517
292 see, 126.765 126.628 -0.137
293 we 127.185 126.768 -0.417
294 have 127.405 127.068 -0.337
295 successfully 127.685 127.388 -0.297
296 replaced 128.585 127.688 -0.897
297 the 129.375 128.568 -0.807
298 default 130.015 129.508 -0.507
299 cursor 130.635 130.048 -0.587
300 with 131.135 130.628 -0.507
301 our 131.815 131.712 -0.103
302 own 132.075 131.872 -0.203
303 little 132.515 132.072 -0.443
304 component. 132.975 132.512 -0.463
305 And 133.955 132.992 -0.963
306 as 134.395 134.272 -0.123
307 I 134.635 134.412 -0.223
308 click 134.755 134.632 -0.123
309 to 135.135 134.752 -0.383
310 press 135.395 135.172 -0.223
311 down, 135.675 135.392 -0.283
312 it 136.315 135.692 -0.623
313 animates 136.535 136.332 -0.203
314 to 137.115 136.532 -0.583
315 the 137.335 137.112 -0.223
316 pressed 137.655 137.352 -0.303
317 variant, 138.155 137.652 -0.503
318 yet 139.135 138.192 -0.943
319 on 139.515 138.240 -1.275
320 hover 139.815 138.960 -0.855
321 of 140.115 139.520 -0.595
322 these 140.515 139.840 -0.675
323 cards, 140.875 140.120 -0.755
324 nothing 141.675 140.520 -1.155
325 happens 142.335 140.860 -1.475
326 just 142.895 142.048 -0.847
327 yet. 143.255 142.348 -0.907
328 So 143.955 142.888 -1.067
329 how 144.555 143.248 -1.307
330 do 144.735 144.480 -0.255
331 we 144.875 144.600 -0.275
332 switch 144.995 144.740 -0.255
333 to 145.415 144.880 -0.535
334 the 145.735 145.000 -0.735
335 correct 145.975 145.440 -0.535
336 variants 146.455 145.740 -0.715
337 on 147.135 145.960 -1.175
338 hover? 147.595 146.480 -1.115
339 I'll 148.195 147.100 -1.095
340 select 148.695 147.580 -1.115
341 the 148.975 148.576 -0.399
342 first 149.195 148.716 -0.479
343 card 149.595 148.976 -0.619
344 here. 150.015 149.196 -0.819
345 I'll 150.645 149.596 -1.049
346 head 151.345 149.996 -1.349
347 over 151.465 151.232 -0.233
348 to 151.645 151.372 -0.273
349 the 151.785 151.452 -0.333
350 cursor 151.965 151.652 -0.313
351 property 152.345 151.792 -0.553
352 and 152.985 151.952 -1.033
353 this 153.985 152.332 -1.653
354 time 154.165 153.920 -0.245
355 I'll 154.385 154.000 -0.385
356 pick 154.625 154.180 -0.445
357 set 154.885 154.360 -0.525
358 variant. 155.345 154.620 -0.725
359 Framer 156.805 154.880 -1.925
360 knows 157.065 155.340 -1.725
361 that 157.425 156.800 -0.625
362 this 157.825 156.880 -0.945
363 page 158.105 157.100 -1.005
364 already 158.425 157.440 -0.985
365 has 158.825 157.840 -0.985
366 a 159.265 158.120 -1.145
367 cursor 159.465 158.460 -1.005
368 defined 159.805 158.840 -0.965
369 and 160.405 159.240 -1.165
370 it 161.445 159.460 -1.985
371 allows 161.605 159.800 -1.805
372 me 161.905 161.376 -0.529
373 to 162.085 161.456 -0.629
374 simply 162.245 161.616 -0.629
375 switch 162.645 161.876 -0.769
376 its 163.145 162.096 -1.049
377 variants 163.545 162.236 -1.309
378 without 164.185 162.636 -1.549
379 having 165.105 163.156 -1.949
380 to 165.525 163.536 -1.989
381 redo 165.725 164.992 -0.733
382 all 166.085 165.252 -0.833
383 of 166.385 165.532 -0.853
384 these 166.505 165.732 -0.773
385 settings. 166.665 166.112 -0.553
386 So 167.345 166.392 -0.953
387 I'll 167.705 166.532 -1.173
388 go 167.925 166.672 -1.253
389 over 168.085 167.372 -0.713
390 all 168.365 167.692 -0.673
391 of 168.565 167.912 -0.653
392 these 168.705 168.072 -0.633
393 cards, 168.925 168.372 -0.553
394 select 169.805 168.592 -1.213
395 set 170.565 168.712 -1.853
396 variant. 171.005 168.912 -2.093
397 and 171.750 170.176 -1.574
398 simply 172.370 170.556 -1.814
399 pick 172.690 170.996 -1.694
400 the 173.030 171.796 -1.234
401 matching 173.290 172.356 -0.934
402 variant. 173.750 172.696 -1.054
403 There 174.410 173.036 -1.374
404 are 175.190 173.296 -1.894
405 no 175.430 173.736 -1.694
406 settings 175.770 174.756 -1.014
407 I 176.170 175.196 -0.974
408 have 176.410 175.436 -0.974
409 to 176.610 175.756 -0.854
410 redo. 176.810 176.156 -0.654
411 Everything 177.730 176.416 -1.314
412 gets 178.470 176.616 -1.854
413 inherited 178.710 176.796 -1.914
414 from 179.290 178.080 -1.210
415 the 179.650 178.500 -1.150
416 page 179.870 178.720 -1.150
417 cursor. 180.290 179.300 -0.990
418 And 181.030 179.660 -1.370
419 just 183.870 179.860 -4.010
420 like 184.050 180.300 -3.750
421 that, 184.230 183.744 -0.486
422 if 184.690 183.864 -0.826
423 we 184.930 184.044 -0.886
424 now 185.090 184.244 -0.846
425 give 185.450 184.684 -0.766
426 this 185.790 184.944 -0.846
427 page 186.190 185.104 -1.086
428 another 186.570 185.444 -1.126
429 preview, 187.070 185.784 -1.286
430 we'll 188.130 186.204 -1.926
431 still 188.510 186.604 -1.906
432 have 188.730 187.456 -1.274
433 our 189.110 187.936 -1.174
434 custom 189.370 188.476 -0.894
435 circle 189.810 188.716 -1.094
436 and 190.450 189.096 -1.354
437 on 191.370 189.396 -1.974
438 hover... 191.670 189.796 -1.874
439 and 0.000 191.140 ---
440 on 0.000 191.380 ---
441 hover 0.000 191.660 ---
-----------------------------------------------------------------------------------------------------
Total Words: 442
Words with significant diff (>0.1s): 266
✓ website/src/lib/cartesia-stt.test.ts (1 test) 20836ms
✓ Cartesia STT Timestamp Debugging > compares Batch API vs WebSocket API timestamps 20835ms
Test Files 1 passed (1)
Tests 1 passed (1)
Start at 15:23:53
Duration 21.16s (transform 32ms, setup 0ms, collect 139ms, tests 20.84s, environment 0ms, prepare 40ms)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment