s2t 0.1.4__py3-none-any.whl → 0.1.5__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- s2t/recorder.py +3 -16
- {s2t-0.1.4.dist-info → s2t-0.1.5.dist-info}/METADATA +1 -1
- {s2t-0.1.4.dist-info → s2t-0.1.5.dist-info}/RECORD +6 -6
- {s2t-0.1.4.dist-info → s2t-0.1.5.dist-info}/WHEEL +0 -0
- {s2t-0.1.4.dist-info → s2t-0.1.5.dist-info}/entry_points.txt +0 -0
- {s2t-0.1.4.dist-info → s2t-0.1.5.dist-info}/top_level.txt +0 -0
s2t/recorder.py
CHANGED
@@ -194,7 +194,8 @@ class Recorder:
|
|
194
194
|
# Log unexpected key reader errors to aid debugging, but keep recording running.
|
195
195
|
print(f"Warning: key reader stopped unexpectedly: {e}", file=sys.stderr)
|
196
196
|
|
197
|
-
|
197
|
+
# Unbounded audio queue to avoid drops on slower machines; control signals are separate.
|
198
|
+
audio_q: queue.Queue[tuple[str, Any]] = queue.Queue()
|
198
199
|
chunk_index = 1
|
199
200
|
chunk_paths: list[Path] = []
|
200
201
|
chunk_frames: list[int] = []
|
@@ -290,25 +291,11 @@ class Recorder:
|
|
290
291
|
frames_written += len(data)
|
291
292
|
tx_queue.put((-1, Path(), 0, 0.0))
|
292
293
|
|
293
|
-
# Timestamp of last dropped-frame warning (throttling for verbose mode)
|
294
|
-
last_drop_log = 0.0
|
295
|
-
|
296
294
|
def cb(indata: Any, frames: int, time_info: Any, status: Any) -> None:
|
297
|
-
nonlocal last_drop_log
|
298
295
|
if status:
|
299
296
|
print(status, file=sys.stderr)
|
300
297
|
if not self._paused:
|
301
|
-
|
302
|
-
audio_q.put_nowait(("frames", indata.copy()))
|
303
|
-
except queue.Full:
|
304
|
-
# Drop frame if the queue is saturated; throttle warnings.
|
305
|
-
now = time.perf_counter()
|
306
|
-
if self.verbose and (now - last_drop_log) > 1.0:
|
307
|
-
print(
|
308
|
-
"Warning: audio queue full; dropping input frames.",
|
309
|
-
file=sys.stderr,
|
310
|
-
)
|
311
|
-
last_drop_log = now
|
298
|
+
audio_q.put(("frames", indata.copy()))
|
312
299
|
|
313
300
|
key_t = threading.Thread(target=key_reader, daemon=True)
|
314
301
|
writer_t = threading.Thread(target=writer_fn, daemon=True)
|
@@ -3,14 +3,14 @@ s2t/cli.py,sha256=Qf6Hz0Ew9ncLbQQoCPDG7ZiYWeGbwBcZMZi_WbEu54w,20018
|
|
3
3
|
s2t/config.py,sha256=lFc_x5fIx_q0JpTcI4Lm4aubxhIXVH34foBvLMUNFGs,437
|
4
4
|
s2t/outputs.py,sha256=Lo8VcARZ7QPuuQQNu8myD5J4c4NO1Rs0L1DLnzLe9tM,1546
|
5
5
|
s2t/py.typed,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
|
6
|
-
s2t/recorder.py,sha256=
|
6
|
+
s2t/recorder.py,sha256=bzf3DxwXSO9VmMWDnAW96Q6t0IG1Xnj-Cn8g-t3s0qo,15509
|
7
7
|
s2t/types.py,sha256=jBiRN-tr0qVw-lhaXvnsyKrVGDyLkqEbxs9qkQ6qGqI,339
|
8
8
|
s2t/utils.py,sha256=YU6YhiuONmqhrKte4DY5tiC5PP-yFExJMMBzFUiA8qA,3416
|
9
9
|
s2t/whisper_engine.py,sha256=x-V7ST9e3JnwMWdbMh4C7dHjA420jaOtXH2-igeh7vc,6492
|
10
10
|
s2t/translator/__init__.py,sha256=K-MKves7kZ4-62POfrmWeOcBaTjsTzeFSu8QNHqYuus,239
|
11
11
|
s2t/translator/argos_backend.py,sha256=VW_OYFFBuNZgcWM-fbvR6XGokuxS2fptkCMFIO9MD1I,19068
|
12
|
-
s2t-0.1.
|
13
|
-
s2t-0.1.
|
14
|
-
s2t-0.1.
|
15
|
-
s2t-0.1.
|
16
|
-
s2t-0.1.
|
12
|
+
s2t-0.1.5.dist-info/METADATA,sha256=2ib6WJF5wef_EdJH7fSuwNzoevoZCMLr9tAGldphqBs,4642
|
13
|
+
s2t-0.1.5.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
14
|
+
s2t-0.1.5.dist-info/entry_points.txt,sha256=JISIUlZAJ3DX1dB6zT3X_E3vcXI-eWEQKwHiT35fPKs,37
|
15
|
+
s2t-0.1.5.dist-info/top_level.txt,sha256=o8N0JcuHdIrfX3iGHvntHiDC2XgN7__joyNu08ZOh0s,4
|
16
|
+
s2t-0.1.5.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|